On Mon, Nov 01, 2010 at 12:25:53PM +0000, Alex Scotton wrote:
On Mon, Nov 1, 2010 at 12:04 PM, Chris G cl@isbd.net 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.
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.
Please excuse my ignorance; it has been awhile, but does SSH not log you into the directory that is set as the user's default directory? Could you not setup users for each of these directories and log into them dependently? or do you need a user to be able to login with their user name each time for every directory?
Yes, it does, but I want to log on as a specific user (www-data) and get to different places so I can go straight to editing different virtual web sites.