ssh passwordless login from windows to linux fails
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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 using git bash, I have open ssh installed on windows side, so I tried with windows command line ssh command with the same result. I have corrected the permission as you outlined without any luck. What are the other trouble shooting steps to dig more into?
I know absolutely nothing about openssh on the Windows command line. Does it even have a ~/.ssh directory with keys inside? "~/" is not a valid location on the Windows filesystem. How did you generate the keys?
On the Linux system, try generating a key and adding it to the authorized_keys file, then see if you can ssh to yourself without a password
Code:
ssh-keygen -t rsa # keep hitting enter through the prompts to take the default values
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
ssh localhost
If that works, you know the server is configured correctly, then you can focus on the Windows side.
Windows does have a perfectly-serviceable SSH client that is called putty. I have successfully used it to connect back-and-forth between Linux and Windows for many years. "It's just ... Win-doze ... that's all."
SSH can handle authentication using a traditional username and password combination or by using a public and private key pair. The SSH key pair establishes trust between the client and server, thereby removing the need for a password during authentication. While not required, the SSH private key can be encrypted with a passphrase for added security.
The PuTTY SSH client for Microsoft Windows does not share the same key format as the OpenSSH client. Therefore, it is necessary to create a new SSH public and private key using the PuTTYgen tool or convert an existing OpenSSH private key.
Last edited by sundialsvcs; 02-17-2017 at 12:31 PM.
The purpose is we are given windows machine which should do build automatically and deploy artifact to list of linux machines, I was given user name and public private keys for the user. the passwordless login happens during deployment which uses plain ssh command to do this, for this I should get plain ssh command working from windows console. Maybe there are other options I am missing, but this is the approach I am taking now.
Still not seen a confirmation on what you are using to connect from Windows to Linux. If this is putty, then you need to convert the private keys to .ppk format to be able to use them with the putty client.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.