Create a Secure SSH Server in Ubuntu

Create a Secure SSH Server in Ubuntu

Following one of the ways to create a secure ssh server in Ubuntu 8.04 Server.

  • Install Ubuntu 8.04 Server
  • Change root password
    sudo passwd root
  • Add new username
    sudo adduser to2k

  • sudo visudo
    Append this line to end of ile
    to2k ALL=(ALL) ALL
  • SSH Configuration
    sudo nano /etc/ssh/sshd_config
    Find Port 22 and change number to something different (12345) to make hacking more difficult.
    Set these to:
    PermitRootLogin no
    X11Forwarding no
    UsePAM no

    Append these lines to the very end:
    UseDNS no
    AllowUsers to2k
    • Reload SSH

/etc/init.d/ssh reload

  • Test SSH Login

SSH login to your slice to new port, with your new username and password:
Linux: ssh -p 12345 to2k@
Windows: putty to2k@

If you logged on successfully via your new username: ‘to2k’ – you may close ‘root’ session now.

Share this Story:
  • facebook
  • twitter
  • gplus

About admin

Saya seorang teknisi elektronika bandara yang sering lupa. Tulisan di Blog ini sebagai catatan kecil untuk bisa mengingat.

Leave a comment