diff --git a/src/Applications/Network/OpenSSH.md b/src/Applications/Network/OpenSSH.md new file mode 100644 index 0000000..ef26b14 --- /dev/null +++ b/src/Applications/Network/OpenSSH.md @@ -0,0 +1,56 @@ +# [OpenSSH](https://www.openssh.com/) + +| Distribution | Package | +| ------------ | --------- | +| Arch Linux | `openssh` | +| Ubuntu | `openssh` | +| Homebrew | `openssh` | + +Edit `~/.ssh/config`: + +```txt +Host myserver + Hostname server-address + User user + Port port + IdentityFile /path/to/private/key +``` + +Connect: + +```sh +ssh -p port user@server-address +ssh myserver +``` + +## SSH key + +Generate key: + +```sh +ssh-keygen -t rsa -b 4096 -C "your@email.com" +``` + +Start: + +```sh +eval "$(ssh-agent -s)" +``` + +Add key: + +```sh +ssh-add ~/.ssh/id_rsa +``` + +Confirm key has been added: + +```sh +ssh-add -l +``` + +Copying public key to server: + +```sh +ssh-copy-id -i ~/.ssh/id_rsa.pub user@server-address +``` diff --git a/src/SUMMARY.md b/src/SUMMARY.md index 13a5c5e..0e683cf 100644 --- a/src/SUMMARY.md +++ b/src/SUMMARY.md @@ -24,6 +24,7 @@ - [HTTPie](Applications/Network/HTTPie.md) - [Mosh](Applications/Network/Mosh.md) - [Ncat](Applications/Network/Ncat.md) + - [OpenSSH](Applications/Network/OpenSSH.md) - [OpenVPN](Applications/Network/OpenVPN.md) - [sshuttle](Applications/Network/sshuttle.md) - [System](Applications/System/README.md)