way to set shell used for remote commands?

Iain Morgan imorgan at nas.nasa.gov
Thu Jan 22 06:26:52 AEDT 2015


On Wed, Jan 21, 2015 at 17:29:00 +0000, Alex Bligh wrote:
> 
> On 21 Jan 2015, at 15:36, Jason Vas Dias <jason.vas.dias at gmail.com> wrote:
> 
> > Please can OpenSSH provide some way of specifying which shell to use to
> > execute commands on a host.
> 
> Using dash as an example of another shell:
> 
>    ssh 127.0.0.1 -t dash
> 
> and
> 
>    ssh 127.0.0.1 dash -c env
> 
> appear to do the expected for me.
> 

Two years ago, I opened a bug to add support for a ForceShell option
to sshd that would provide the ability to override users shells. There
doesn't seem to have been much interest in it, and I never received any
feedback.

I haven't updated the patch since the original submission, and it may
need some further work, but it might be worth a try. I don't recall it
it overrides the user's shell during forced password changes, so that
may be one area that needs to be addressed.

-- 
Iain Morgan


More information about the openssh-unix-dev mailing list