how to make sshd start a shell other than bash when I log in?

Gluszczak, Glenn Glenn.Gluszczak@dell.com
Tue Apr 18 01:11:00 GMT 2017


Odd.  To change to csh with sshd I have /bin/tcsh in /etc/passwd.
I then wanted to automatically switch to CMD so I tried /cygdrive/c/.../cmd.exe but I was getting extra newlines from cmd.
I ended up switching to tcsh in /etc/passwd and using a .login containing

exec cmd /q

to stop the newlines.  

Perhaps you can try a .profile with an exec to fish?


---------------------------------
Hm. So this is documented in "The db_shell setting" at https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch. AFAICT, the only useful option there for my purposes is to set

db_shell = /bin/fish

After restarting sshd, this does make fish my login shell. Of course, it makes fish the login shell for every other user on the host too, but for single-user hosts such as mine, that works fine. Thanks.

Andrew


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list