===== SSH ===== ==== generating keys, setting up config, basic and usefull commands ==== {{ https://upload.wikimedia.org/wikipedia/en/6/65/OpenSSH_logo.png }} What's up folks! Markiplier here, I will show you how to work with SSH for different systems. I don't have any expirience with Apple software but it should handle the same as Linux I will mention if Windows needs special attention. SSH stands for **S**ecure **Sh**ell. It's used most commonly for connecting to servers/computers. It was a replacement for Telnet, which is plaintext, while SSH uses stronk encryption. The most common SSH is OpenBSD's OpenSSH, but there are alternatives like Dropbear. Everything written inside //// I will write ''$'' if user can write a command and ''#'' if you need elevated privileges like with sudo/doas/root/admin if you want to connect to a server, write in your shell\\ ''$ **ssh** ////**@**////'' There flags that you should know ^ flag ^ what is it for ^ | ''-p'' | for port | | ''-i :localhost:'' | port forwarding from __server__ to client | | ''-L :localhost:'' | port forwarding from client to __server__ | | ''-N'' | do not execute any commands, useful for port forwarding | | ''-f'' | run ssh in background after auth, also useful for port forwarding | | ''-P'' | for port in scp | === How to simplify connections === You can create ''config'' file in your .ssh folder, it's located in your /home/ directory, or /root or in C:\Users\ in case of Windows Host Hostname User IdentityFile Port You have way more settings to work with so look them up and have fun! Flags mentioned above can be also set in ''~/.ssh/config'' //(with appropriate keywords)// How does my machine become a server? In case of Linux and Unix like systems, you should start sshd daemon, like ''# systemctl enable --now sshd'' It's best to edit ''/etc/ssh/sshd_config'' as sudo/root and change the settings you want. In general it's best to disable passwords and root login. Just uncomment the line by deleting "#" and write yes/no in appropriate place === SSH clients for Windows === * The easiest - Powershell/Terminal * [[https://putty.org/index.html|PuTTY]] * [[https://termius.com/index.html|Terminus]] * [[https://mobaxterm.mobatek.net/|MobaXterm]] === Usefull links === * [[https://wiki.archlinux.org/title/OpenSSH|Arch Linux wiki]] * [[https://wiki.gentoo.org/wiki/SSH|Gentoo Linux wiki]] * [[https://wiki.alpinelinux.org/wiki/Setting_up_a_SSH_server|Alpine Linux wiki]]