Help answer threads with 0 replies.
Go Back > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.


  Search this Thread
Old 07-24-2015, 11:17 PM   #1
Registered: Aug 2007
Posts: 280

Rep: Reputation: 17
Question How to make a Password-Less Login from Windows to Linux using OpenSSH?

I installed the OpenSSH on my Windows Machine. I want to connect to the remote Linux machine without typing password. I followed the bellow instructions but the SSH needs password to establish the connection yet.
1.Open CMD and run: ssh-keygen -t rsa (The public and private keys are generated in the C:\Users\user.ssh) folder
2.Copy the content into /home/kouhi/.ssh/authorized_keys in my Linux remote machine
3.In Linux Machine run: chmod 700 .ssh
4.In Linux Machine run: chmod 644 .ssh/authorized_keys

When I try to Ssh the connection ask me the password yet. Also I tied Ssh -i C:\Users\user.ssh\id_rsa

Also I get the following reply when run the ssh command:
Permissions 0644 for 'C:\\Users\\user\\id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: C:\\Users\\user\\id_rsa
Old 07-25-2015, 12:56 AM   #2
Registered: Nov 2010
Location: The Danger Zone
Distribution: Slackware & everything else in a VM
Posts: 287

Rep: Reputation: 29
Looks to me as the Server authorization is flagging the clients insecure setup. I would suggest generating another RSA key in a more secure private folder and trying again on the client machine. I'm no expert though.
Old 07-25-2015, 01:15 PM   #3
Registered: Apr 2004
Location: Hell, Arizona (July - 118 degrees)
Distribution: Slackware 14.2 soon to be Slackware 15
Posts: 596

Rep: Reputation: 116Reputation: 116
You want to make sure the .ssh directory is chmod 700. read/write/execute by owner only. Neither group nor others have any access at all.

id_rsa needs to be chmod 600, not 644. That is what it is complaining about, and that is what you need to fix. 644 lets group/others have read access to it. You do not want group or others to have any access to it at all.

So go to your linux box and chmod the id_rsa file to 600.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] OpenSSH: require both, Password and RSA-Key for root-login didi86 Linux - Security 8 05-14-2014 05:24 AM
How to make my linux database use linux login/password info cknorr Linux - Software 2 09-02-2009 01:21 PM
OpenSSH: password vs rsa authentication, different behaviour on Windows hintze Linux - General 2 07-15-2008 08:54 AM
How to make Suse ask for password on login? NNP SUSE / openSUSE 1 11-14-2004 01:10 PM > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 01:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration