User Tools

Site Tools


howto:ssh

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

howto:ssh [2026/07/09 17:04] – created zacharyhowto:ssh [2026/07/12 09:53] (current) – small fixes and redoing the article, not yet finished zachary
Line 1: Line 1:
 ===== SSH ===== ===== SSH =====
 +
 ==== generating keys, setting up config, basic and usefull commands ==== ==== generating keys, setting up config, basic and usefull commands ====
  
 {{ https://upload.wikimedia.org/wikipedia/en/6/65/OpenSSH_logo.png }} {{ 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. +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.
-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. 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 //<brackets should be replaced, with them included>// +Everything written inside //<brackets should be replaced, with them included>// I will write ''$'' if user can write a command and ''#'' if you need elevated privileges like with sudo/doas/root/admin
-I will write ''$'' if user can write a command and ''#'' if root/admin has to intervene+
  
-if you want to connect to a server, write in your shell\\  +if you want to connect to a server, write in your shell\\  ''$ **ssh** //<user>//**@**//<ip or domain>//''
-''$ **ssh** //<user>//**@**//<ip or domain>//''+
  
 There flags that you should know There flags that you should know
-  * ''-p'' for port 
-  * ''-i <your private key'' include key 
-  * ''-v'' verbose, if you need more info on what is happening during connection and breaking it 
-  * ''-R <server port>:localhost:<client port>'' port forwarding from __server__ to client 
-  * ''-L <client port>:localhost:<server port>'' 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 
  
 +^ flag  ^ what is it for ^
 +| ''-p''                   | for port |
 +| ''-i <your private key'' | include key |
 +| ''-v'' | verbose, if you need more info on what is happening during connection and breaking it |
 +| ''-R <server port>:localhost:<client port>'' | port forwarding from __server__ to client |
 +| ''-L <client port>:localhost:<server port>'' | 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 |
  
-<file - config> +=== How to simplify connections === 
-Host <yourname>+You can create ''config'' file in your .ssh folder, it's located in your /home/<user> directory, or /root or in C:\Users\<user> in case of Windows 
 + 
 +<code - config> 
 +Host <your chosen name>
   Hostname <your IP/domain>   Hostname <your IP/domain>
   User <your username>   User <your username>
   IdentityFile <path to private SSH key>   IdentityFile <path to private SSH key>
   Port <port opened for SSH>   Port <port opened for SSH>
-</file>+</code> 
 + 
 +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 === === SSH clients for Windows ===
 +
   * The easiest - Powershell/Terminal   * The easiest - Powershell/Terminal
   * [[https://putty.org/index.html|PuTTY]]   * [[https://putty.org/index.html|PuTTY]]
Line 41: Line 54:
  
 === Usefull links === === Usefull links ===
 +
   * [[https://wiki.archlinux.org/title/OpenSSH|Arch Linux wiki]]   * [[https://wiki.archlinux.org/title/OpenSSH|Arch Linux wiki]]
   * [[https://wiki.gentoo.org/wiki/SSH|Gentoo Linux wiki]]   * [[https://wiki.gentoo.org/wiki/SSH|Gentoo Linux wiki]]
   * [[https://wiki.alpinelinux.org/wiki/Setting_up_a_SSH_server|Alpine Linux wiki]]   * [[https://wiki.alpinelinux.org/wiki/Setting_up_a_SSH_server|Alpine Linux wiki]]
 +
 +
howto/ssh.1783616658.txt.gz · Last modified: by zachary

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki