How to install and use SSH in ubuntu

Source: Internet
Author: User
How to install and use SSHubuntu in ubuntu does not install the ssh service by default. if you connect to ubuntu through ssh, you need to manually install ssh-server. To determine whether to install the ssh service, run the following command: xjj @ xjj-desktop :~ $ Sshlocalhostssh: connectt...
How to install and use SSH ubuntu in ubuntu is not installed by default. if you connect to ubuntu through ssh, you need to manually install ssh-server. To determine whether to install the ssh service, run the following command: xjj @ xjj-desktop :~ $ Ssh localhost ssh: connect to host localhost port 22: Connection refused as shown in the preceding figure, indicating that no installation is available. you can install it through apt by running the following command:-desktop :~ $ Sudo apt-get install openssh-server xjj @ xjj-desktop :~ $ Sudo apt-get install openssh-server www.2cto.com will be installed automatically. after the installation is complete, start the service: @ xjj-desktop :~ $ Sudo/etc/init. d/ssh start xjj @ xjj-desktop :~ $ Sudo/etc/init. d/ssh start after startup, you can run the following command to check whether the service is correctly started @ xjj-desktop :~ $ Ps-e | grep ssh 6212? 00:00:00 sshd xjj @ xjj-desktop :~ $ Ps-e | grep ssh 6212? 00:00:00 sshd www.2cto.com. Note that the default port of ssh is 22. you can change the port, stop it, and then start it. Modify the configuration in/etc/ssh/sshd_config, as shown below. Xjj @ xjj-desktop :~ $ Vi/etc/ssh/sshd_config # Package generated configuration file # See the sshd (8) manpage for details # What ports, IPs and protocols we listen for Port 22 # Package generated configuration file # See the sshd (8) manpage for details # What ports, IPs and protocols we listen for Port 22 www.2cto.com, it should be the connection time. See the following command: xjj @ xjj-desktop :~ $ Ssh exceljava@192.168.158.129 xjj @ xjj-desktop :~ $ Vi/etc/ssh/sshd_config

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.