- First install SSHD (secure shell daemon) and client. Type in the following commands in a terminal session:
sudo apt-get install openssh-server openssh-client
- Test your installation by connecting to your own server. Type in the following comand:
- Basically you connect to your SSH server by knowing three things: 1) your domain name or ip address, 2) your username, and 3) your password.
- If you are using another remote Linux terminal to connect to your SSH server you will type the following terminal commands:
ssh your-username your-server-domain.name-or-ipaddress
example: ssh dan somedomain.com
example: ssh email@example.com
- If you are using a program like PuTTY in Windows to connect to your SSH server you will need to fill in your domain name or ip address and click “Open”, after which you will be prompted for your username and password.
- The terminal commands to start, stop and restart your sshd server are:
sudo /etc/init.d/ssh start
sudo /etc/init.d/ssh stop
sudo /etc/init.d/ssh restart
If you are l having problems connecting to your SSH server from another remote computer it may be a firewall issue. By default SSH makes connections on port 22, so you will have to make sure port 22 is open on your Linux computer, and if you are connecting from another network that port forwarding is enabled on your local router/firewall device on port 22 as well.