How Ubuntu uses SSH to connect remote computers

Source: Internet
Author: User
Tags ssh server

Currently, most Linux distributions have pre-installed SSH clients that can connect to other people's computers. But there are exceptions to the situation, so, the following first SSH client and server installation together to talk about it.

SSH client and server installation is very simple, after opening the terminal, only need two commands:

sudo apt-get install openssh-Client # #这是安装客户端sudo apt-get install Openssh-server # #这是安装服务端

When the default installation is complete, the service is turned on automatically, and can be viewed through ps-e | grep ssh , which indicates success if Ssh-agent appears. How do you shut down a server if you don't want someone else to log on to your computer? Very simple, just enter

sudo service ssh stop

It's done, easy,:-). What about opening it again? Smart you must have thought that just enter

sudo service ssh start

The service is open again, convenient! (*^__^*) hehe ...

OK, after installing the SSH client and server, let's log in to our computer and try it out.

In Terminal input:

SSH [email protected]

USR is a username, hostname is the name of your host, like my host name is Ubuntu, because my Linux distribution is Ubuntu, if I want to use flyingrain this user login Ubuntu this host, you can lose:

SSH [email protected]

As long as you enter this user's password can be logged in, is not very convenient?

OK, let's log in to the remote computer and try it out. If you want to log in to a remote computer, you need to have SSH server installed. Let's say my friend's computer is already installed on the SSH server, so I can do this to log in to his computer:

[Email protected]

Also usr refers to a user of the computer, IP refers to the computer's IP address (so the remote computer connected to the best use of static IP). Executing this command will let you enter the password, just enter the USR password. If this is the first connection, then the server will ask you if your online key has not been established, would you like to accept the key from the server and build it online? Oh! This time please "be sure to enter yes instead of Y or y" so that the program will accept Oh!

After the connection, you can achieve the purpose of remote control host, and operate almost like the operation of their own computer

How Ubuntu uses SSH to connect remote computers

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.