Resolution of SSH password-less login configuration error in Hadoop cluster setup some netizens said that firewall should be disabled before ssh is configured. I did it, but it should be okay to close it. Run the sudoufwdisable command to disable the firewall. then enter www.2cto. comssh-keygen on the terminal and parse the SSH password-less logon configuration error when prompted to access the terminal.
Some netizens said that the firewall needs to be closed before configuring ssh. I did it, but it should be okay to close it. Disable the firewall command "sudo ufw disable". then enter
Www.2cto.com
Ssh-keygen
If you are prompted to enter the file name or password, simply press Enter. After completion, ". ssh "directory," ls. after ssh, we will find two files, one is id_rsa and the other is id_rsa.pub. The former is the private key and the latter is the public key.
Enter www.2cto.com on the terminal
Cat ~ /. Ssh/id_rsa.pub> ~ /. Ssh/authorized_keys
Create a trusted connection list
Enter ssh localhost on the terminal to perform a single-host loopback ssh password-free logon test
If an error message is displayed, it is similar
There may be two reasons:
The first step is not to install the ssh-client.
Enter sudo apt-get install openssh-client.
After the installation is complete, enter "ssh localhost. Enter relevant information as prompted.
The second is the issue of ssh-server.
Because openssh-client is installed in Ubuntu by default, generally ssh-client won't be a problem here. if your system is not installed, simply use the first method.
Then we need to confirm whether the sshserver is started:
Command: ps-e | grep ssh
If
If only ssh-agent is available, the ssh-server has not been started or is not installed./etc/init. d/ssh start is required. if you see sshd, the ssh-server has been started.
If the ssh-server has not been installed, run the command: sudo apt-get install openssh-server to install ssh-server.
However, sometimes the following errors may occur:
This indicates that there may be no software package in the system. perform the update operation:
Sudo apt-get update (keep online)
Install ssh-server after the download and installation are complete:
Sudo apt-get install openssh-server
We are viewing ssh-related processes.
Ps-e | grep ssh
You will see
In this way, our ssh client and server have been installed.
Run the command: ssh localhost
Log out:
Now, the password-free ssh logon test is successful.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.