User Tools

Site Tools


ssh_keys

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
ssh_keys [2016/05/03 07:29] luke7858ssh_keys [2024/05/23 07:26] (current) – external edit 127.0.0.1
Line 21: Line 21:
 <sxh bash> <sxh bash>
 ssh-copy-id -i ~/.ssh/servername_id_rsa.pub [email protected] ssh-copy-id -i ~/.ssh/servername_id_rsa.pub [email protected]
 +</sxh>
 +If the server has a custom port:
 +<sxh bash>
 +ssh-copy-id -i ~/.ssh/servername_id_rsa.pub '-p 1234 [email protected]'
 </sxh> </sxh>
 \\ \\
Line 48: Line 52:
 ssh ServerName ssh ServerName
 </sxh> </sxh>
 +\\
 +\\
 +=== Locking Down to Keys-Only ===
 +Next we could potentially lock down the server so ONLY keys work. 
 +\\
 +Add the following to /etc/ssh/sshd_config
 +<sxh bash>
 +PasswordAuthentication no
 +</sxh>
 +Then make sure you reload the configuration file.
 +\\
 +\\
 +WARNING: Keep one session open and attempt to log in from a different session, this allows you to get back in if you made an incorrect update
ssh_keys.1462260548.txt.gz · Last modified: 2024/05/23 07:26 (external edit)

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki