Lampros - Weird Bricks

set up the SSH Daemon (sshd) on FreeBSD 9.0 and starting with Putty on Windows

09 February, 2013 | SSH

Hi all,

Setting up SSH is really easy and even in a Virtual Machine offers a major advantage - you can connect to the VM using Putty or any other *nix ssh client that will allow you to copy paste commands.

Besides that, the most common usage of SSH is to access a server remotely - SSH is encrypted so all username/passwords cannot be intercepted.

Let's see how to set it up - you actually don't need to install anything:

1) If you want root logins you need to edit the file: /etc/ssh/sshd_config
Use ee to edit:

ee /etc/ssh/sshd_config

2) Scroll down to line 46:

#PermitRootLogin no

change it to:

PermitRootLogin yes

3) Save and exit

4) Make sure sshd starts on boot:

echo "sshd_enable=YES" >> /etc/rc.conf

5) Start up sshd:

/etc/rc.d/sshd start

6) Make sure it's running, type:

sockstat -4

In the output you should get:

7) Now let's download putty - go to:

8) Save the file on your desktop and open it, you should get the following screen:

9) In "Host Name" enter the IP address of your FreeBSD virtual machine and click 'Open'

10) The putty terminal should open, login as user root and enter your password.

Done! You should now be logged in! :)