Setting up OpenSSH Server in Ubuntu

sudo apt-get install openssh-server
pgrep sshd

Review configuration and make changes wherever necessary. Default protocol is ssh2, listen port is 22 and listens to all ipv4 and ipv6 addresses.
sudo vim /etc/ssh/sshd_config

Try it out :
ssh 127.0.0.1

If you plan to ssh over the internet and you have firewall enabled, make sure to allow incoming request at ssh listen port.

sudo ufw status
sudo ufw allow 22
sudo ufw status

If you have dynamic ip and want to use a ddns mapper like dyndns or dlinkddns, you will need configure ddns setting and forward ssh port in the router.

#Check if the port is being forwarded properly:
http://www.canyouseeme.org/
#Check if are able to ssh over the internet:
https://www.serfish.com/console/

Now you can access your home computer form work!

SSH security: http://www.cyberciti.biz/tips/linux-unix-bsd-openssh-server-best-practices.html
Disable password login: http://lani78.wordpress.com/2008/08/08/generate-a-ssh-key-and-disable-password-authentication-on-ubuntu-server/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s