User Tools

Site Tools


Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:public:enable_ssh_access [2020/01/16 00:48]
lucenera [Hardening ssh]
en:public:enable_ssh_access [2021/05/18 21:53] (current)
lucenera
Line 5: Line 5:
     $ ssh-keygen -t rsa -b 4096 -C "​your_email@example.com"​     $ ssh-keygen -t rsa -b 4096 -C "​your_email@example.com"​
  
-2. Copy the contents of the //​id_rsa.pub//​ file to the clipboard +2. Create //config// file
- +
-    $ pbcopy < ~/​.ssh/​id_rsa.pub +
- +
-3. Create //config// file+
  
     $ cd ~/.ssh     $ cd ~/.ssh
     $ cat >> config     $ cat >> config
     Host turris     Host turris
- Hostname 192.168.1.1 +    ​Hostname 192.168.1.1 
- Port 22 +    Port 22 
- User root +    User root 
- IdentityFile ~/​.ssh/​id_rsa+    IdentityFile ~/​.ssh/​id_rsa
  
 If remote-editing (using Sublime Text, TextMate, or VS Code) is desired, modify //config// to resemble: If remote-editing (using Sublime Text, TextMate, or VS Code) is desired, modify //config// to resemble:
Line 25: Line 21:
       RemoteForward 52698 localhost:​52698       RemoteForward 52698 localhost:​52698
  
-4. Press ⌃+D to end editing+3. Press Enter and Ctrl()+D to end editing
  
 ===== Turris configuration ===== ===== Turris configuration =====