Home > Operation and Maintenance > Linux Operation and Maintenance > SSH alias login key login instance tutorial

SSH alias login key login instance tutorial

零下一度
Release: 2017-06-25 10:12:36
Original
1493 people have browsed it

Use an alias and key to log in on centos:

vim /root/.ssh/config #Enter the following content
Host *
User root #Log in as root
ServerAliveInterval 60 #Survival time
#test1
Host q0 #Login alias
HostName 10.10.10.1 #ip address
User root
Port 22
IdentityFile ~/.ssh/skey_web #Path of private key
#web1
Host q1
HostName 10.10.10.1
User root
Port 22
IdentityFile ~/.ssh/ skey_web
Transfer the private key to the path defined above to modify permissions:
chmod 600 ~/.ssh/skey_web
Required Want to change. Only the owner can read and write
Then restart ssh and try to log in:
ssh q1

The above is the detailed content of SSH alias login key login instance tutorial. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template