added ~/.ssh/config
This commit is contained in:
67
ssh/config.md
Normal file
67
ssh/config.md
Normal file
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user