Saturday, February 06, 2010

Setting default SSH shell to bash

I spent some times to figure out how to execute a remote command using “bash” and thought of sharing my findings (make your job easier).

An easy way is to go and edit ~/.profile and add the bash over there.

However above will not work if you try to remotely execute a script file, to solve that issues you need to edit

/etc/passwd

Find the entry corresponding to your logging and edit the last part of the entry for example; if the entry is like;

abc:x:13:13:abc:/bin:/bin/sh
then change that to
abc:x:13:13:abc:/bin:/bin/bash

You are in the business now…