auto login not working after ssh-keygen


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers auto login not working after ssh-keygen
# 1  
Old 11-22-2011
Question auto login not working after ssh-keygen

Hi,

I have a generic id say "abc". In a client i logged into using this generic id and generated the key for autologin to do ssh to a server.

I have kept the key in authorized_keys file in the server under the home directory of this generic id. (/u/abc/.ssh/authorized_keys)

when i do ssh to server from this client it is not logging in automatically and asking me to enter the password.

How to fix it. i have other generic ids for which auto login is working fine. only for this partcular id i am facing the problem.

what could be the issue, Please suggest. Thanks.
# 2  
Old 11-22-2011
Hi,

can you please post the command you enter to start the ssh session and the output of the subsequent login failure? (please use verbose output from ssh with the -vvv switch)

thanx
fra
# 3  
Old 11-23-2011
options to note:
1. is /u/abc/ the right home directory for abc?
2. maybe its about time you create a new id_rsa.pub adn copy the contents anew to your server's authorized_keys

goodluck!
# 4  
Old 11-23-2011
Hi,

As i already mentioned, it is working fine for other generic ids. so it is not time which is the fact for the issue.

i ran the command ssh-keygen -t rsa and it created a file named id_rsa.pub which contains the value that i copied it to authorized_keys file in /u/abc in the server.

it is not giving any error when it tried to login automatically from client, just asking password to enter.

also i found something else when i dig more,
i logged in to server directly by this way

Code:
 
ssh rbalaj16@server1
pasword: (here i am entering the password)
./sesu - abc
password: (same password again i enter here)

when it goes inside, it is not setting the PATH variable which wil be set using the procedure mentioned in .login or .profile file under /u/abc. even whoami command also not working. is this the one making issue when i try to autologin?
but for other generic ids PATH set is working fine.
# 5  
Old 11-23-2011
Hi,

regarding getting rid of the password request at login time, try to explicitly specify the full path to the id_rsa (the local *private* key) on your local host with the -i switch of ssh command and let's see if passwordless login works.

Please also use the -vvv switch so that we can see the full ssh session debug messages.

Then we can nail down the other issues.

see ya soon
fra
This User Gave Thanks to frappa For This Post:
# 6  
Old 11-23-2011
MySQL

Hi,

Auto login is working fine now.

i googled with error after i enable the verbose mode -v
found a forum SSH Key Failure on One Account - The macosxhints Forums
which discussed on the same topic.

it worked out after i change the permission as below.

Code:
 
chmod 700 /u/abc/.ssh/authorized_keys
chmod 600 /u/abc/.ssh


Thanks for your help and suggestions.

---------- Post updated at 08:10 AM ---------- Previous update was at 08:04 AM ----------

Hi,

can you please help me to fix the another issue i mentioned in this thread.

when i get into a server as genric id say "abc". it is not setting PATH variable, even whoami also failing.

what changes i have to make in .login or .profile file.
# 7  
Old 11-23-2011
Hi,

can you please try to check if .bashrc in the user's remote home directory is exsistent and contains a PATH definition? If not, create/edit the .bashrc file so that there is a PATH definition in there; finally source .bashrc in your users' remote homedir .bash_profile, i.e.:
Code:
 source ~/.bashrc

let us know how it goes
see ya
fra
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Commands not working with ssh remote login

Hi Friends, I am unable to run our application commands on remote server using ssh (passwordless login enabled). But the same command running with telent perl script. please suggest. SSH: C:/bin>ssh -l monitor tl04cp01 exec "/home/monitor/123" /home/monitor/123: viewlog: not found. ... (7 Replies)
Discussion started by: suresh3566
7 Replies

2. 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

3. UNIX for Dummies Questions & Answers

ssh-keygen error

Hi, I using ssh-keygen for passwordless authenciation firstly and I am following these steps mentioned below... 1) Login to pngpcdb1 using your user/pass 2) type 'bash' (without quotes) 3) ssh-keygen #generates private and public key. 4) copy this private key to the location of your sftp... (1 Reply)
Discussion started by: karan2597
1 Replies

4. UNIX for Dummies Questions & Answers

keygen-ssh

Hi, I was going thruough the password less authentication of keygen-ssh that will help us in generating keys...One thing that is not clear to me that if in nearby future we conncet to remote ftp server in that case now we need to only provide the user id itself that is password would not be... (1 Reply)
Discussion started by: rahul125
1 Replies

5. UNIX for Dummies Questions & Answers

ssh-keygen

Hi, I am new to unix, recently i was exploring password less remote connection to the ftp server and in that I was exploring the ssh-keygen utility, that it generates private & public keys that helps in transmitting files in encrypted format.Could you please explain me in detail about the... (1 Reply)
Discussion started by: rahul125
1 Replies

6. Shell Programming and Scripting

issue while auto login using .ssh for HPUX

Hi, While trying to supress password prompt using ssh. I have added .ssh folder manually and generated public key and added to authorized_keys file in the remote machine. But still it's prompting for passwords with the following message: Permission denied... (5 Replies)
Discussion started by: 116@434
5 Replies

7. UNIX for Advanced & Expert Users

ssh-keygen stops working

Hey guys, I was using ssh-keygen settings for a long time to login on remote machines without password. 2 days back it suddenly stops working, i tried by reset all ssh-keygen setting but it not works. what could be the reason of this issue and how can i resolve this? (2 Replies)
Discussion started by: RohitKJ
2 Replies

8. Shell Programming and Scripting

how to use ssh-keygen to login to a UNIX box

I have to login with ssh to a UNIX box and execute a script in it. How will i make use of ssh-keygen so that while login using ssh it wont ask the passwod. ssh-copy-id is not working in my UNIX box . What might be the reason. Please help. (1 Reply)
Discussion started by: codeman007
1 Replies

9. Shell Programming and Scripting

SSH-Keygen script

Hello friends, I wanna to make new script which work as i defined below (1) it connect (using ssh) to remote server (2) remote server having passphrase key with password (3) Generate new passphrase on local machine with random 8 character password. (4) It will atomatically uploaded to... (4 Replies)
Discussion started by: jagnikam
4 Replies

10. UNIX for Advanced & Expert Users

ssh-keygen questions (not working)

I have created the keys and placed the public key in the remote user directory (not the server root). (remote machine: dwebapp1) ex: /home/webarch/user_name/.ssh/authorized_keys2 cannot ssh into the remote machine using the following command: ssh ${dwebapp1} the manned description gives... (10 Replies)
Discussion started by: tekline
10 Replies
Login or Register to Ask a Question