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
Building an image is a very important process in ...
After Vmvare sets the disk size of the virtual ma...
Table of contents 1. Database Overview 1.1 Develo...
This article mainly explains how to deploy Elasti...
Table of contents Let's talk about flattening...
Table of contents 1. Custom instructions 1. Regis...
Preface When creating a primary and foreign key f...
1. Problem The problems encountered when initiali...
Table of contents 1. Original Definition 2. JS op...
First, take a look at Alibaba Cloud's officia...
To transfer files between the host and the contai...
I recently watched a video of a foreign guy using...
RULES can be used to control the style of the int...
Table of contents Configuration parsing Service C...
Result: Implementation code: html <div class=&...