Visit Our UNIX and Linux User Community


authorized_keys and passwordless login


 
Thread Tools Search this Thread
Operating Systems Linux Red Hat authorized_keys and passwordless login
# 1  
Old 12-04-2003
authorized_keys and passwordless login

I am trying to set up ssh/scp to be able to login in w/o using a password. The man pages for ssh and ssh-keygen explain how to do this.

So, using "rsa1" style, I created the public and private keys by way of ssh-keygen, then added the contents of "$HOME/.ssh/identity.pub" to a newly created "$HOME/.ssh/authorized_keys" file on the remote system I am want to log into.

But, it is still asking me for a password when I ssh to the remote server. I did not use a passphrase, either, when creating the keys by way of ssh-keygen.

What am I doing wrong????? I also found this resource on the web, and it verifys that I am doing this step by step.

If anyone has done this, please let me know what I am doing wrong!!!

Thanks in advance,

MC
# 2  
Old 12-04-2003
got it working . . .

Problem was . . . ssh was expecting SSH2/protocol 2. So, I used the -oProtocol=1 option on the ssh/scp commands, and it works!!!

You can either manually override it using the above -o option, or change the Protocol in ssh_config(default is 2,1, meaning that version 2 is tried first and falls back to version 1 if 2 is not available, that is why I was getting hosed . . .Smilie)

MC
# 3  
Old 07-17-2004
Passwordless login

Hey,

I am facing the same problem as you did. But using the -o option manully and trying also is not resolving the problem...

Any suggestions.....Basically, i got it working from machine A to B...i am not able to do so from B to A
# 4  
Old 07-17-2004
Here's one thing to check....authorized_keys will be ignored if it is writable or could be replaced by anyone other than you. So $HOME must be writable only by you. Ditto $HOME/.ssh and $HOME/.shh/authorized_keys. This also applies to the parent directory of $HOME all the way back to /.
# 5  
Old 07-18-2004
Perderabo

This is my folder structure..

/home/ravala/.ssh

ravala and ssh are writable only by me. I dont have permissions to change the properties of home.

But still it prompts for password.
# 6  
Old 07-19-2004
MySQL

Hi,

I got this working, but not sure how this worked. I deleted all the old keys and created new keys . Also checked the folder permission as Perderabo suggested. It works fine now without any password prompt.

Thanks for all your help
# 7  
Old 05-09-2008
Hi guys,

I'm bumbling through something similar.

I'm having trouble understanding the client server terminology.

I have a Laptop with Redhat linux on, and I'd like to back the hard disk up, across my home LAN to a Sun Solaris 8 server.

In this case, which is regarded as the server and which is the client?

Many thanks and kind regards,

Stin

Previous Thread | Next Thread
Test Your Knowledge in Computers #2
Difficulty: Easy
Unix was invented by Steve Jobs of Apple Computer.
True or False?

9 More Discussions You Might Find Interesting

1. Windows & DOS: Issues & Discussions

Passwordless login from Linux server to windows server

Hi, I am a newbie and has been given a task to connect to a windows server from a linux server (using putty of course; for file transfer) that too passwordless. Searching through google I found "ssh-keygen" but this also couldn't work because as I tried ssh <username>@<windowsServerIP>, it says... (5 Replies)
Discussion started by: pratria
5 Replies

2. Shell Programming and Scripting

Passwordless login gets deactivated after some time

Hi Friends, I was successfully able to login passwordlessly to server 1.1.1.2 from server 1.1.1.1 by following the below steps. I had already generated the keys using (ssh-keygen -t rsa) once and i am assuming i do not have to do that again. ssh id@1.1.1.2 mkdir -p .ssh cat... (8 Replies)
Discussion started by: srkmish
8 Replies

3. Shell Programming and Scripting

Expect script ssh passwordless login

how can i use an expect script to do a passwordless ssh login and run a script on a bunch of remote hosts? I do not want to use public key authentication as this would require me to setup the keys on the clients etc.... (2 Replies)
Discussion started by: tdubb123
2 Replies

4. Shell Programming and Scripting

Passwordless Authentication and Anonymous login

Hi, I am in the process FTPing some of my report files from my production server to another FTP server through batch/Shell Script. This is working fine with the password less authentication. Once i place all my report files in the ftp server the end users need to download ... (3 Replies)
Discussion started by: Showdown
3 Replies

5. Solaris

[solved] Ssh passwordless login not working

This is Solaris 10 and sorce+destination are non root user. Somehow it is broke and I am not able to fix it. Already checked permissions on both servers and authorized_keys entry of destination is same as id_rsa.pub of source server. I can not regenerate keys on source server because I do not know,... (0 Replies)
Discussion started by: solaris_1977
0 Replies

6. UNIX for Advanced & Expert Users

Intermitent issue with passwordless login

Hi, I have two users login on my HPUX i.e user1 and user2. Inorder to switch from user1 to user2 without password I generated key pair using keygen command for user id user1 and copied the its public key to the .ssh/authorized_keys file of user2. ssh-keygen -b 2048 -t rsa This... (5 Replies)
Discussion started by: mohtashims
5 Replies

7. HP-UX

Unable To Perform A "Passwordless" SSH Login To A Server

Greetings! I am trying to perform a passwordless SSH login from a HPUX 11.31 client to a HPUX 11.31 server. Whenever I do a "ssh -l root serverA" from the client, I am prompted for a password. Giving the password, I am able to successfully login. However I am trying to accomplish a... (9 Replies)
Discussion started by: Rob Sandifer
9 Replies

8. Solaris

passwordless login issue with ssh keys

Hi GUYS, Me have 2 servers, eg:: A & B id_dsa.pub key of B had been put in authorized_keys of A & Vice versa Passwordless login going from A to B. But while connecting from B to A ,its asking password Any one please help me out.. (6 Replies)
Discussion started by: racechap
6 Replies

9. Solaris

Passwordless Login between users

Hi Gurus, Wanted to know if there is a way to enable passwordless login between specific users in a Solaris (5.9)server. I copied the public key of first user into the $HOME/.ssh/authorized_keys file of the second user. But it didn't work out. Note - Am talking about users in the same... (9 Replies)
Discussion started by: Hari_Ganesh
9 Replies

Featured Tech Videos