Ssh programs include the client program openssh-client and the server program openssh-server. If you need to log on to another computer through ssh, you need to install openssh-client. This program is installed in Ubuntu by default. To remotely connect to the local machine, you must install openssh-server. Installing openssh-server in Ubuntu is very simple. Install openssh-server $ sudoapt
Ssh programs include the client program openssh-client and the server program openssh-server. If you need to log on to another computer through ssh, you need to install openssh-client. This program is installed in Ubuntu by default. To remotely connect to the local machine, you must install openssh-server. Installing openssh-server in Ubuntu is very simple.
Install openssh-server
$ Sudo apt-get install openssh-server
Check whether openssh-server is enabled
$ Ps-e | grep ssh
Process ssh-agent is the client, and sshd is the server. If the result contains a sshd process, it indicates that openssh-server has been started. If not, run the command to start it.
The command to start, stop, and restart openssh-server is as follows:
/Etc/init. d/ssh start
/Etc/init. d/ssh stop
/Etc/init. d/ssh restart
Configure openssh-server
The openssh-server configuration file is located in/etc/ssh/sshd_config. Here, you can configure the SSH service port. For example, the default port is 22 and can be customized to another port number, such as 222, then restart the SSH service.
Disable ssh logon to the root user
It is very dangerous to open the ssh root permission, so it is not particularly necessary. You should disable this permission and find a line of PermitRootLogin yes in the configuration file/etc/ssh/sshd_config, change yes to no and restart ssh.
Configure openssh-server in Ubuntu to automatically start upon startup
Open the/etc/rc. local file and add the following before the exit 0 statement:
/Etc/init. d/ssh start
About Client Connection
The Client can use SSH Client software such as putty, SecureCRT, and SSH Secure Shell Client, enter the IP address of your server, and enter the login user and password to log on. The client software I often choose is putty.
Ssh Encryption
In fact, ssh is much more used than that. ssh also has a very important part, that is, ssh is encrypted through the public key and private key. For example, git can be accessed through encrypted ssh. Ssh encryption is not discussed here for the time being. If you have the opportunity to add it, you can view the relevant information.
Related reading:
The whole process of configuring SSH service under Ubuntu and the solution of http://www.linuxidc.com/Linux/2011-09/42775.htm
Install Git, SSH and Permission denied solutions in Ubuntu 12.04 http://www.linuxidc.com/Linux/2013-06/85336.htm
Ubuntu 12.10 OpenSSH offline Installation Method http://www.linuxidc.com/Linux/2013-04/82814.htm
Install or set http://www.linuxidc.com/Linux/2013-07/87368.htm in SSH under Ubuntu
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2