Ssh/config

Упрощение покдлючения
~/.ssh/config Пример конфигурации:

Host   shortname HostName sample.foo.bar User user Protocol 2 Port 10022 ForwardX11 no   ForwardAgent no    Compression no    IdentityFile ~/.ssh/example_dsa

Аналогом ключей -XY являются записи forwardx11 yes ForwardX11Trusted yes

~/.ssh/config file:

Host * Protocol 2 IdentityFile %d/.ssh/keys.d/id_rsa.%l IdentityFile %d/.ssh/keys.d/id_dsa.%l IdentityFile %d/.ssh/keys.d/%u@%l

The %d is translated to be the user's home directory by OpenSSH and in the ~/.ssh directory I have created keys.d as a symlink to the directory path on the encrypted USB drive when it is properly mounted.

The %l expression is translated to be the local client machines hostname and %u will be translated to the local client's username.