MacOS uses a CentOS remote server

Source: Internet
Author: User

Recently re-entered the overseas server, want to toss something, has not used the server for almost a year, forget a lot of things, this time to do the side of the memory while learning

First of all, you have to log in.

# SSH [Email protected]

Enter the password on the line, by the way. The default password for the server you are purchasing is%x5ph.] ap$2{.? *CJ look at the safety of not ...

and change the password first.

# passwd Root

An incredibly basic Linux command

And then go with SSH.

First, what is SSH

SSH I first use or in the use of GitHub, SSH is secure Shell, is a convenient security authentication services, simply speaking is their own terminal production of their own secret key, as an identity, the server over there to add this key, so every time to SSH link, The server will check your logo, found that you have saved this logo, it means to know this terminal, directly allow the login

The generation of SSH is not specifically said.

Ssh-keygen -t rsa-c  '[email protected]'

After the build, you need to put the logo into the server

SCP ~/. SSH

This command is actually to copy the file, the ~/.ssh/id_rsa.pub copy of the machine to [email protected]:~/go, this time because there is no login, so will enter the login password

Enter the password after the server's ~/path has a id_rsa.pub file, this time on the server to continue operations can be

cat id_rsa.pub >>. SSH

Import the contents of the id_rsa.pub. Ssh/authorized_keys, so that even if the completion of the recognition, as long as the direct SSH [email protected] can login

But the IP address is not so good to remember, but also bad input, this time can be configured for SSH, open ~/.ssh/config if not created

Write in config

Host        mynamehostname        xx.xx.xx.xxxPort            #ssh服务器端口, the default is 22User            rootidentityfile    ~/.  SSH/id_rsa

MyName is a custom name for this host, fill in the following, even if the server-related information, port with the default of 22 can be, identityfile fill in the SSH key to use

This config is written right after the direct

ssh myname

You can log in.

Cond

MacOS uses a CentOS remote server

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.