How to install SSH on Ubuntu
Contents |
SSH Installation
Logon to the ubuntu server and open the terminal when you are using the graphical user interface. Type the following commands to install the OpenSSH client and server.
sudo apt-get install openssh-server openssh-client
Test the SSH service
Type the following command to test the openssh-server:
shh user@localhost
The system will prompt for an message to accept the public key. This key is used for the RSA authentication. Accept the public key en authenticate with the OpenSSH server.
SSH Management
Type the following command to start/stop/restart the SSH server:
Start SSH Server
sudo service ssh start
Stop SSH Server
sudo service ssh stop
Restart SSH Server
sudo service ssh restart
When this command returns in an error then navigate to the path /etc/init.d
Type the following command to start the SSH server:
Start SSH Server
ssh start
Stop SSH Server
ssh stop
Restart SSH Server
ssh restart
Configuration Files
The configuration files are located in:
/etc/ssh/
Use ssh_config to edit your own ssh client settings and use sshd_config to edit the openssh server settings.
Enable Root Access
By default root access is disabled. To enable root access the following configuration file needs to be edited:
/etc/ssh/sshd_config
To edit with the nano editor use the following command, do not forget the sudo command because else you do NOT have permission to save the config.
sudo nano /etc/ssh/sshd_config
Change the following rule:
PermitRootLogin: No <– change it to –> PermitRootLogin : Yes
Press CTRL + O to save the changes and restart the SSH server
Date of last update: 5-28-10
Author: Peter Hooghuis
This article is our expertise.
What to do next :
- Learn more about our core values
- Discover what they say about us
- Call us at (888) 772-0201 to see how we can work together.



