PuTTY: Change default SSH login directory

Bernd picture Bernd · Aug 20, 2010 · Viewed 43.2k times · Source

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/

Answer

lagivan picture lagivan · Apr 17, 2013

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