diff --git a/ssh/config.md b/ssh/config.md new file mode 100644 index 0000000..6cf226c --- /dev/null +++ b/ssh/config.md @@ -0,0 +1,67 @@ +# Notes about the ```~/.ssh/config``` file + +## 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 +``` \ No newline at end of file