What is ssh Administrators can log in remotely to manage multiple hosts located in different locations that are connected via the Internet. Administrators can perform the following operations on remote hosts:
Unfortunately, these operations are not safe! Use plain text passwords and send them in clear text
During daily operation practice, when logging in to other hosts with ssh, you may need to enter the login password every time, even when using scp to copy something. In order to switch hosts more conveniently and quickly, ssh non-encrypted communication is a better choice; Generate a key using ssh-keygen, which is saved locally by default in /root/.ssh/id_rsa Then use ssh-copy-id to distribute to the target host; log in as user@host name or IP address Notice: 1. It is best to use the host name and write the host name and the corresponding IP address in the /etc/hosts file; 2. Password-free communication requires mutual authentication between both parties, so the same operation needs to be performed on the target host. [root@www ~]# ssh-keygen -t rsa -P '' Generating public/private rsa key pair. Enter file in which to save the key (/root/.ssh/id_rsa): /root/.ssh/id_rsa already exists. Overwrite (y/n)? [root@www ~]#ssh-copy-id -i .ssh/id_rsa.pub [email protected] /usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: ".ssh/id_rsa.pub" The authenticity of host '172.16.75.1 (172.16.75.1)' can't be established. ECDSA key fingerprint is SHA256:YXhbTS9MfK2IQC4gtOW4RL8voHvFqC1cAAMJXuF3Wec. ECDSA key fingerprint is MD5:2c:c0:94:e8:3a:e4:74:88:c0:d8:e0:01:20:81:1d:8e. Are you sure you want to continue connecting (yes/no)? yes /usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed /usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys [email protected]'s password: Number of key(s) added: 1 Now try logging into the machine, with: "ssh '[email protected]'" and check to make sure that only the key(s) you wanted were added. The above is the full content of this article. I hope it will be helpful for everyone’s study. I also hope that everyone will support 123WORDPRESS.COM. You may also be interested in:
|
<<: How to achieve 3D dynamic text effect with three.js
>>: Detailed explanation of how to restore database data through MySQL binary log
When I was writing a project yesterday, I needed ...
This article uses examples to describe the add, d...
I believe that everyone needs to reinstall MySQL ...
A few days ago, I wrote an article about using CS...
Effect screenshots: Implementation code: Copy code...
Table of contents 1. props 2..sync 3.v-model 4.re...
Table of contents Preface 1. insert ignore into 2...
This article shares the specific code of JavaScri...
ssh-secure shell, provides secure remote login. W...
Preface What is a slow query and how to optimize ...
background Recently, I executed a DML statement d...
Two cases: 1. With index 2. Without index Prerequ...
Display Definition ID When the auto-increment ID ...
Table of contents 1. Constraint concepts and clas...
The appearance of a web page depends largely on i...