SSH on Linux

Today we will have a look at SSH, primarily on Linux.  This tutorial will show you how to ssh to a server called Server1 (ip address 192.168.1.2) from a PC called PC1 (ip address 192.168.1.3) both on the same network and both running Linux Mint 10.

Most modern Linux distributions come with ssh installed by default but if not you will need the following packages:

ssh (so you can ssh clients from your machine)

openssh-server (allowing remote access to your machine).

You will need to install openssh-server on Server1 and ssh on PC1.  Before we can connect to Server1 open up port 22 on any firewalls between PC1 and Server1 (including any routers).

Once installed open up a terminal on PC1 and type:

ssh (username)@192.168.1.2 or alternatively ssh (username)@Server1

replacing (username) with a valid user on Server1.  You will be asked for a password so when prompted enter the users password.  Once done you will be connected to Server1. It is that easy!!

So that is internal on the same network how do we do it over the internet?  You will need to find out the address of your router and then port forward to your Servers internal ip address. For example to ssh to Server1 over the internet you would type the following:

ssh user@routers_ip_address

replacing user with a valid user on Server1.  If you have opened port 22 on the router and forwarded any ssh traffic to Server1 at ip 192.168.1.2 then you would be connected to Server1.


About the Author

Hi I am Chris the owner of ComTech. I provide IT Support, Laptop repairs and Computer repairs to both personal and business clients in and around Stirling. For a list of what I can offer you why not visit my website www.comtech247.net where you will find my blog, testimonials, services and much more.  Start supporting a local business today so I can start supporting you.

If you found this blog useful then why not sign up to my RSS Feed for news, tutorials, views and general techie stuff!!

 

 

This entry was posted in Blog and tagged linux, openssh, ssh. Bookmark the permalink.

5 comments on “SSH on Linux

  1. You made some nice points there. I did a search on the subject and found most guys will approve with your site.

  2. Reached your blog post through Bing. You know I will be subscribing to your feed.

  3. Remarkable knowledge! I have been looking for anything like this for a time finally. Regards!

  4. Telnet sends all information in clear text which means anyone snooping around can catch the data and read it. SSH sends the data in encrypted format so even if someone gets hold of the data they can’t read it.

  5. Anonymous on said:

    I am a newbee so please have patience with my question. Why use this over telnet?

    Thanks

Leave a Reply

Your email address will not be published.

43,646 Spam Comments Blocked so far by Spam Free Wordpress

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>