mirror of
https://gitlab.waag.org/make/fablab/interns/2025/sam.git
synced 2025-08-03 11:54:58 +00:00
Docs about sshs config file
This commit is contained in:
45
docs/bootcamp/ssh_config.md
Normal file
45
docs/bootcamp/ssh_config.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# SSH config files
|
||||
|
||||
## brief
|
||||
This is the first time for me using ssh config files so that's why this is a seperate file.
|
||||
|
||||
## What can you do with ssh config files
|
||||
In SSH config files you can describe how connections should be handled and with which keys you want to use to log in onto a specific server and much more.
|
||||
|
||||
## How is a config file structured
|
||||
```config
|
||||
Host hostname1
|
||||
SSH_OPTION value
|
||||
SSH_OPTION value
|
||||
|
||||
Host hostname2
|
||||
SSH_OPTION value
|
||||
|
||||
Host *
|
||||
SSH_OPTION value
|
||||
```
|
||||
A entry always start with `Host` and then the name you wanna give to that host. After that you press enter and then tab. Now you can define the options for the ssh connections.
|
||||
|
||||
Example:
|
||||
```config
|
||||
HOST gitwaag
|
||||
Hostname gitlab.waag.org
|
||||
User git
|
||||
IdentityFile ~/.ssh/id_ed25519
|
||||
IdentitiesOnly yes
|
||||
```
|
||||
In this config I defined the host as gitwaag. So I can connect to it using the command ```ssh gitwaag``` instead of ```ssh gitlab.waag.org```.
|
||||
|
||||
#### Explanation of the parameters used in this config above
|
||||
* `Hostname` Defines the hostname/domain of the server
|
||||
* `User` The username you wanna log in as on the server
|
||||
* `IdentityFile` Which public key you want to use for the connection
|
||||
* `IdentitiesOnly` Set it to only use the IdentityFile instead of other authentication files.
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
## Sources:
|
||||
* https://linuxize.com/post/using-the-ssh-config-file/
|
||||
* https://phoenixnap.com/kb/ssh-config
|
Reference in New Issue
Block a user