Setup ssh from bash
On the machine you want to initiate the SSH connection navigate to your home directory.
1 | |
Check if a .ssh directory exists, if it does navigate inside. Otherwise run ssh and attempt to log into the machine with a username and password. Once successful, log out. There will now be a .ssh directory. Navigate inside.
Next, create a config file with vim config
Setup your host:
1 2 3 | |
Generate the ssh key:
1 | |
Then copy the key with:
1 | |
To specific a specific key later, add IdentityFile ~/.ssh/keyfilehere.key to the config entry for the host
Last update:
2022-02-12 15:57:16