Re: way to set shell used for remote commands?

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



On 2015-01-21, Jason Vas Dias <jason.vas.dias@xxxxxxxxx> wrote:

> Please can OpenSSH provide some way of specifying which shell to use to
> execute commands on a host.

No way.  The security fallout is staggering.

> For the account I need to use,  the user's password shell is not acceptable,
> (a ten year old version of bash 3.0)
> and cannot be changed without weeks or months of burocracy , if at all.

Oh, but you could install a new sshd there?

> I built & installed the latest bash under that account, in the ~/bin directory,
> but SSH will not use it.

---- ~/.profile --->
case $BASH_VERSION in
	3.*) exec ~/bin/bash -l ;;
esac
<-------------------

You can build something similar with ~/.bashrc for non-login shells.

> Using the client OpenSSH version : 1:6.6p1-2ubuntu2 on a linux x86_64
> Ubuntu 14.04.1 host,
> if I try to specify which bash to use for an  SSH command like :
>  $ ssh $account /home/${user}/bin/bash -c 'echo $BASH_VERSION; echo
> $BASH_VERSION';
> something very weird happens - only the second statement produces any
> output .

Insufficient quoting.
$ ssh $account "/home/${user}/bin/bash -c 'echo \$BASH_VERSION; echo \$BASH_VERSION'"

-- 
Christian "naddy" Weisgerber                          naddy@xxxxxxxxxxxx
_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev




[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux