Question

PuTTY: Change default SSH login directory

In Windows, I use PuTTY to log in a Linux-based remote server via SSH.

Is is possible to change the default directory entry point I get to after I connect and login? (That would be a nice time saver.)

e.g. from server/home/ to server/home/subdir/subdir/

 45  50800  45
1 Jan 1970

Solution

 80

You can also change the directory within PuTTY itself:

  1. Configuration → Connection → SSH

  2. Fill in the "Remote command" field with the following:

    cd subdir/subdir ; /bin/bash
    
2013-04-17

Solution

 43
  • Add cd subdir/subdir to ~/.bashrc or ~/.bash_profile, or
  • change the home directory of the user.
2010-08-20