Checking your Facebook page from Starbucks? Checked your banking information from the Hotel WiFi? Or are you going to Defcon this year?
- Install and configure a SSH Server (FreeBSD 9.0)
- Create users.
- Secure and harden the server.
- Configure SSH client (PuTTY) in windows
- Create Public and Private keys for authentication
- Set up Password-less login.
- 1 vCPU
- 128MB vRAM
- 16GB HDD
- 1 Public IP
- FreeBSD 9.0 i386
Installation Steps:
- Create the Guest Machine
- Save and Power On. VM should boot from DVD press Enter to continue.
- Play this video for actual installation step
Configuration Steps:
- Create a new user by typing "adduser" then Enter. P.S. add user to "wheel" group so that user can invoke "SU -"
- Login as the newly created user
- mkdir ~/.ssh
- chmod 700 .ssh
- su -
- Enter root password
- cp /etc/ssh/sshd_config ~/sshd_config.orig
- cd /home/n3onli8
- cp /etc/ssh/sshd_config /home/n3onli8/sshd_config
- vi sshd_config
- I configured it to look like:
Protocol 2 HostKey /etc/ssh/ssh_host_rsa_key HostKey /etc/ssh/ssh_host_dsa_key
KeyRegenerationInterval 1h ServerKeyBits 1024 LoginGraceTime 2m PermitRootLogin no #StrictModes yes PubkeyAuthentication yes AuthorizedKeysFile %h/.ssh/authorized_keys # Change to NO to enable built-in password authentication. PasswordAuthentication yes PermitEmptyPasswords no UsePAM no AllowAgentForwarding yes AllowTcpForwarding yes GatewayPorts yes X11Forwarding yes X11DisplayOffset 10 X11UseLocalhost yes PrintLastLog yes TCPKeepAlive yes PermitTunnel yes # override default of no subsystems Subsystem sftp /usr/libexec/sftp-server
- Quit and Write changes
- rm /etc/ssh/sshd_config
- mv /home/n3onli8/sshd_config /etc/ssh/sshd_config
- /etc/rc.d/sshd restart
- exit (exit su)
man ssh for better understanding of sshd_config
Part II will cover setting up putty in MS Windows
Thanks for reading. Comment below