budiana

ssh debian and ubuntu

Oct 21st, 2016
507
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.77 KB | None | 0 0
  1. Login and su into root. Edit this file:
  2.  
  3. nano /etc/ssh/sshd_config
  4.  
  5. Scroll down for a bit and you’ll see a line that says
  6.  
  7. PermitRootLogin without-password
  8.  
  9. Put a # and a space in front of this line like so:
  10.  
  11. # PermitRootLogin without-password
  12.  
  13. now rewrite it on a new line like this:
  14.  
  15. PermitRootLogin yes
  16.  
  17. Now save the file and restart the SSH server.
  18.  
  19. /etc/init.d/ssh restart
  20.  
  21. Now you can SSH into it directly as root. Congrats! Your old insecure ways of doing things have returned.
  22.  
  23. On Ubuntu
  24.  
  25. sudo passwd
  26.  
  27. Changes in /etc/ssh/sshd_config
  28.  
  29. Change PermitRootLogin
  30.  
  31. PermitRootLogin yes
  32.  
  33. You may also have to check value of PasswordAuthentication. If it is set to no then set to yes
  34.  
  35. PasswordAuthentication yes
  36.  
  37. Then restart SSH:
  38.  
  39. service ssh restart
Advertisement
Add Comment
Please, Sign In to add comment