Key authentication between 1.desktop server two virtual machines
First look at the true IP: if 178.25.254.10
Then two virtual machines can set IP to desktop 178.25.10.11
Server 178.25.10.12
2. Revenue command: Nm-connection-editor or Nmtui for quick editing
3. After completing the IP setting, make the key on the server: Ssh-keygen
1) Always press the ENTER key to quickly set up
2) Ls/root/.ssh will display Id_rsa id_rsa.pub (private key, public key)
3) ssh-copy-id-i/root/.ssh/id_rsa.pub [email protected]
4) Scp/root/.ssh/id_rsa [email protected]:/root/.ssh/
It all looks very perfect, but the point is that we might have a key before, then we have to execute a command
: Rm-fr/root/.ssh If you execute this statement under a desktop virtual machine, there may be a different problem, first we delete the. SSH directory or delete the. ssh directory file or execute rm-fr/root/.ssh/*.
I was annoyed at the varying degrees of errors I had when I executed these two statements. After all, the test is not enough, only one to try, maybe a machine problem, I am on the other computer operation did not appear this error.
The first is to execute rm-fr/root/.ssh/*. But executing on the server
Scp/root/.ssh/[email protected]:/root/.ssh/but hint. SSH is a directory
Scp/root/.ssh/id_rsa [e-mail protected]:/root/.ssh This sentence finally did not "/" but still did not pass. There's no way to Resetdesktop.
The second execution of RM-FR/ROOT/.SSH performs the above two methods of transmission under server. Mactan The first sentence is still. SSH is a directory. The second sentence transmits successfully id_rsa. But underneath the desktop, there's just one more/root/.ssh. and SSH remote access failed. I 艹
either. SSH is a directory or more/root/.ssh can indicate that the transmission is incorrect in order to clean up. SSH does not appear in no such directory or is a directory.
I first cd/root/.ssh and then execute rm-fr/root/.ssh .
Executing the scp/root/.ssh/[email protected]:/root/.ssh/ under Server is 0k.
Welcome to watch Rookie's diary
Key authentication issues for Linux two virtual machines