How to make a Password-Less Login from Windows to Linux using OpenSSH?

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat How to make a Password-Less Login from Windows to Linux using OpenSSH?
# 1  
Old 07-25-2015
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 id_rsa.pub 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 [email]kouhi@remote.com 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:
Code:
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 @ WARNING: UNPROTECTED PRIVATE KEY FILE! @
 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 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


Last edited by rbatte1; 07-27-2015 at 07:32 AM..
# 2  
Old 07-25-2015
While 700 permission on ~/.ssh/ and 600 on ~/.ssh/authorized_keys, both on the remote node, are recommended but not mandatory, the local ~/.ssh/id_rsa NEEDS 600 permission, or ssh will simply ignore a private key file if it is accessible by others. (man ssh).
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Cybersecurity

Root login in Linux - does it make sense?

I stumbled upon this thread and one aspect of it got me thinking. As i am building a small Linux network right now for a friend i would like to hear your opinion on this. I'd like to respectfully disagree. I think the Linux habit of disabling root login per default is wrong (not entirely... (6 Replies)
Discussion started by: bakunin
6 Replies

2. Cybersecurity

SSH password-less login issue between linux and solaris

Hello Gurus, I am trying to set up bidirectional password-less login between a linux and a Solaris. The way I am doing is very simple, which is creating pub/priv key pairs on each host and add the pub key to each other's authorized_keys file: ssh-keygen -t rsa (I tried dsa, and it didn't work... (4 Replies)
Discussion started by: error_lee
4 Replies

3. UNIX for Advanced & Expert Users

openssh 5.3 needs password vs. 4.3 using private keys

Hello, I just installed a bran new Centos 6.2 including openssh 5.3. On older servers I installed older Linux including openssh 4.3, I am using keygen with private/public keys to log root on all servers (in a LAN) without typing password each time. To do this, of course, I have my local... (4 Replies)
Discussion started by: epoins
4 Replies

4. UNIX for Dummies Questions & Answers

Cross complie linux make files onto a windows 7 machine using PGI Cygwin

Hello, I am very unfamiliar with linux/unix (don't even know the difference), but am trying to get some linux software to run on my Windows machine for my research. I have the makefiles for the software, and it is designed to be compiled in the PGI complier, which I also have. When i... (6 Replies)
Discussion started by: roba87
6 Replies

5. AIX

OpenSSH always ask for password

Hello together, I have a Problem with openssh on AIX 5.3. We have a big amount of AIX-hosts that run with openssh but one donīt! Every time we try to connect via ssh to the host, we get a password prompt. The myth ist, that there is no Error or somthing else. Here the output of ssh -vvvv to... (14 Replies)
Discussion started by: heifei
14 Replies

6. Windows & DOS: Issues & Discussions

OpenSSH with windows server 2003

Hi people, I'm trying to configure the OpenSSH in my win server 2003 to accept connection with public/private keys, without password. I research all over internet sites about, almost all them, have the same instructions that doesn't work. I can just get a sFTP connection with password without... (0 Replies)
Discussion started by: laurentiis
0 Replies

7. Windows & DOS: Issues & Discussions

OpenSSH Server for Windows 2003

Hi Gurus I have installed OpenSSH server in one of my Windows 2003 boxes. I have installed the setup and added the users as told in the link. But i am getting an "Access denied" whenever i try to log in through ssh or sftp. But when i try to log in through my loopback IP (127.0.0.1),i am... (1 Reply)
Discussion started by: Renjesh
1 Replies

8. Windows & DOS: Issues & Discussions

Cygwin OpenSSH Windows

Hi all, I am just enjoying my first experience with UNIX type stuff but I am completely stumped with syntax etc. I have installed OpenSSH on my windows machine which is a working nicley and I can gain access using putty. I am however trying to set up public key authentication and turn off passwords... (2 Replies)
Discussion started by: bilbonvidia
2 Replies

9. Solaris

password less login from openssh to SSH Secure Shell 3.0.1 Sun solaris 7

Hi, I would like to login from a Sun server running ssh: Sun_SSH_1.1, SSH protocols 1.5/2.0, OpenSSL 0x0090704f to ssh: SSH Secure Shell 3.0.1 on sparc-sun-solaris2.6 How can I achieve this? Thanks a million in advance (1 Reply)
Discussion started by: newbewie
1 Replies

10. UNIX for Advanced & Expert Users

OpenSSH and password aging

Vesion 3.8.1 of OpenSSH has been compiled on a Solaris 8 host. I am having difficulties in enabling password aging to work from reading /etc/default/passwd and /etc/shadow. # passwd -f < user-id > works satisfactorily however once a password ages through due course from the settings in... (1 Reply)
Discussion started by: raylen
1 Replies
Login or Register to Ask a Question