On 01 Nov 12:04, Chris G wrote:
I'd like to set up some logins to various places around my LAN which not only ssh to the relevant place but also do a cd to a specific directory.
OK - so is this key dependant or user dependant?
Can anyone suggest a way to do this? By default if you give a command to ssh at the end of the line then it executes that command and then closes the connection - it only keeps the connection open if there is no command at the end. In addition doing a cd is even a bit more difficult because it's no use at all to execute it in a sub-shell.
Well, you could always create multiple users with the same uid/gid and make it so that their $HOME is set to the directory you want it to go to, that'd be a fairly typical workaround. -- Brett Parker http://www.sommitrealweird.co.uk/ PGP Fingerprint 1A9E C066 EDEE 6746 36CB BD7F 479E C24F 95C7 1D61