Getting Started with SSH
Chapters
In this short course we will explore what SSH is. This course is split into multiple parts such as
- Introduction to SSH
- Generating a Key Pair to make connections
- Accessing remote servers using SSH client
- Various scenarios SSH can be used in
- Installing SSH server
Primary objective of this course is to get you up and running with SSH.
We hope that you will enjoy this short course.
Author: Subject Coach
Added on: 4th Jan 2015
Please get in touch with your teacher or tutor in case you have a question related to this lesson
None just yet!
Intentionally I installed Ubuntu 14.04 desktop LTS version, as it does not have SSH server installed by default.
If you are hiring a VPS from a VPS provider such as Digital Ocean, SSH server comes pre installed.
OpenSSH server is an open source implementation, that can authenticate users using the standard methods supported by the ssh protocol. On my Linux machine, I will now install OpenSSH server.
I will now show you a couple of settings that you can find handy.
Open sshd_config file, You will observe that SSH port is configured to run on port 22.
You can choose to run it on different port by changing this setting.
Other couple of settings related to, blocking password authentication, and use pam setting, these settings were covered in earlier chapter.
When you install open SSH server, service will automatically start on server restart.
To restart SSH service, just type command as
service SSH restart.
To stop SSH service, type,
service SSH stop.
To start SSH service, type ,
service SSH start.
run these commands as super user. When you start SSH process, it gets a process ID which you are able to see using PS command.
With windows, there is no inbuilt SSH server. You have to look for options such as CygWin, WinSSHD etc.
In this chapter we will use WinSSHD to make our windows machine accept SSH connections.
Goto bitvise website, and download WinSSHD software.
While installing choose personal edition. Personal edition is a free edition, this cannot be used commercially.
Once installation is completed, configuration window opens up, you can set port number and other settings here.
Next you can tell Win SSHD, if you want to allow all windows accounts to connect, or you can add specific accounts, those that will be allowed to connect.
Next set the virtual users. We will add one here and set password for this user.
We will save our settings and start our server. By default, connections are accepted from within LAN. You can configure your windows firewall to allow connection from outside LAN, you may also have to configure your router to forward traffic on port 22 to your host machine.
Once server starts, we are able to connect to our windows machine over SSH from our Linux client.
We are now able to run commands on our windows machine.