Difference between revisions of "Your personal SSH Configuration"

From docwiki
Jump to: navigation, search
(Where do you find configuration files?)
Line 23: Line 23:
 
</pre>
 
</pre>
   
  +
the config file holdes the config. id_rsa is the private key if you use [[SSH With Public-key encryption|Public Key Encryption]] and id_rsa.pub is the public part. The file known_hosts holds the entries for the fingerprints of the hosts that you have already connected to and authorized_keys holds the public keys that are allowed to connect without password.
   
 
== Your .ssh/config ==
 
== Your .ssh/config ==

Revision as of 16:31, 23 March 2020


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

the config file holdes the config. id_rsa is the private key if you use Public Key Encryption and id_rsa.pub is the public part. The file known_hosts holds the entries for the fingerprints of the hosts that you have already connected to and authorized_keys holds the public keys that are allowed to connect without password.

Your .ssh/config