Guest User

Untitled

a guest
Oct 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. cat /etc/ssh/sshd_config | grep PermitRootLogin
  2.  
  3. PermitRootLogin no
  4.  
  5. cat /etc/ssh/sshd_config | grep Protocol
  6.  
  7. Protocol 2
  8.  
  9. cat /etc/ssh/sshd_config | grep Port
  10.  
  11. Port 56789
  12.  
  13. sudo iptables -A INPUT -p tcp -m tcp --dport 56789 -m comment --comment "SSH custom port" -j ACCEPT
  14.  
  15. ssh-keygen -t rsa -b 4096
  16.  
  17. eval $(ssh-agent -s)
  18. ssh-add
  19. ssh-add -l
  20.  
  21. 4096 SHA256:gibberish /home/fictional_user/.ssh/id_rsa (RSA)
  22. 4096 SHA256:gibberish fictional_user@fictional_computer (RSA)
  23.  
  24. ssh-copy-id fictional_user@public_ip -p 56789
  25.  
  26. cat /etc/ssh/sshd_config | grep PasswordAuthentication
  27.  
  28. PasswordAuthentication no
Add Comment
Please, Sign In to add comment