1.1 KiB
1.1 KiB
Notes about the ~/.ssh/config file
For full details: man ssh_config
With Identification file:
Put the following block for every ssh connection:
Host name_of_host
HostName IP/DOMAIN
Port port_of_ssh (default: 22)
User user
IdentityFile /path/to/identityfile
IdentitiesOnly yes/no (can be ommited)
Example:
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/honney-github
IdentitiesOnly yes
Empty:
Host
HostName
Port
User
IdentityFile
Without Identification file:
You will need to put in the Password when logging-in
Put the following block for every ssh connection:
Host name_of_host
HostName IP/DOMAIN
Port port_of_ssh (default: 22)
User user
Example: (equivalent: ssh -p 22 root@192.168.1.255)
Host NAS
HostName 192.168.1.255
Port 22
User root
Empty:
Host
HostName
Port
User
To then use one of these Configs use this command:
ssh name_of_host
Example:
ssh NAS
Empty:
ssh