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
<br />In the page, typesetting is achieved b...
Table of contents Purpose npm init and package.js...
(1) Introduction: clipboard.js is a lightweight J...
1. Basic Use It can be instantiated through the M...
Preface I feel like my mind is empty lately, as I...
Table of contents Declare fonts with font-face co...
Operating system win10 MySQL is the 64-bit zip de...
Table of contents 1. context 1. Usage scenarios 2...
1Basic steps of echarts Four Steps 1 Find the DOM...
Table of contents Preface What is Hot Change Coco...
1. First, the pure HTML file must have an entry i...
1. Hot deployment: It means redeploying the entir...
Table of contents Vue+ElementUI background manage...
Table of contents compose function Array.prototyp...
Encryption and decryption are an important means ...