Your personal SSH Configuration

From docwiki
Revision as of 15:03, 23 March 2020 by Mond (talk | contribs)
Jump to: navigation, search


Motivation

If you use ssh often then always typing long host-names or even remembering IP address is tedious. This is the time when you should start creating your own .ssh/config

Where do you find configuration files?

Configuration files for system wide programs are below /etc. Since ssh has a lot of configuration files they have chosen to put them into their own directory /etc/ssh. The configuration for your ssh client is in /etc/ssh/ssh_config while the configuration for your sshd (d for daemon - the server process) is in /etc/sshd_config and they key files can also be found in that directory.

For programs that are used by users it is necessary to have a config file for each user. Per convention the programs put their configuration files in your home directory with filenames that begin with a dot. dot-files are not shown with the ls command, unless you use ls -a.

Again: since ssh has a lot of config files they use their own hidden directory. .ssh Your ssh directory might look like this:

$ ls -1 ~/.ssh
authorized_keys
config
id_rsa
id_rsa.pub
known_hosts


Your .ssh/config