Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am trying to set up a two-way key-based ssh connection. The idea here is to have the user on server 1 be able to log into server 2 using public/private key authentication and vice versa.
The user is prompted for a password when he logs in from server 1 to server 2, which is incorrect, but is not prompted for a password when he logs in from server 2 to server 1, which is correct.
The steps that I took so far are as follows:
1. created the rsa and dsa key pairs on server 1 as the user.
2. logged in as root on server 2 and created a user account like that on server 1.
3. copied the user's rsa and dsa public key files to server 2, and renamed the dsa public file to authorized_keys2.
4. verified there was no existing known_hosts file.
5. logged back into server 2 to create the known_hosts file.
6. modified the sshd_config file to have the lines:
Protocol 2
AuthorizedKeysFiles .ssh/authorized_keys2
7. modified the ssh_config file to have the line:
Protocol 2
8. stopped and restarted ssh on server 1 and server 2.
I want to be able to log into server 2 from server 1 without password authentication. I can do that now from server 2 to server 1. What other steps do I need to take to correct this? Thanks.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.