ssh without password not workking


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers ssh without password not workking
# 1  
Old 03-18-2011
ssh without password not workking

i tried to automate ssh login without password but really it was not working...
i don't know what is the problem Smilie

i had given the steps i had tried it.


1) login in the hyper (source) with gopc id
2) ssh-keygen -t dsa
3) when you enter the default text then two files will be created (id_dsa and id_dsa.pub)
4) scp ~/.ssh/id_dsa.pub visaac@stage2vm1044:~/
5) go to the stage2vm1044 (dest) and run the below command
cat ~/id_dsa.pub >> ~/.ssh/authorized_keys
# 2  
Old 03-18-2011
Have you checked the permissions of the .ssh subdirectory and the files under it.
Code:
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys


Last edited by fpmurphy; 03-18-2011 at 11:07 AM..
# 3  
Old 03-21-2011
it did it, but still showing the same thing....

~/.ssh 510$ ls -ltr
total 152
-rwxr--r-- 1 visaac users 223 Dec 17 2007 visaac_key.pub
-rwxr--r-- 1 visaac users 447 Jan 4 2008 authorized_keys2
-rwxr--r-- 1 visaac ppusers 72414 Feb 9 2010 known_hosts.bak
-rwxr--r-- 1 visaac ppusers 432 Feb 9 2010 authorized_keys.bak
-rwxr--r-- 1 visaac users 887 Aug 26 2010 visaac_key
-rwxr--r-- 1 visaac users 1675 Mar 14 07:38 id_rsa
-rwxr--r-- 1 visaac ppusers 396 Mar 14 07:38 id_rsa.pub
-rwxr--r-- 1 visaac users 996 Mar 17 20:58 authorized_keys
-rwxr--r-- 1 visaac ppusers 53028 Mar 20 22:14 known_hosts
# 4  
Old 03-21-2011
Look again at fpmurphy's suggestion. The ssh daemon attempts to be secure, and doesn't always like world-readable files, especially files that shouldn't be, like ~/.ssh/authorized_keys2 or ~/.ssh/id_dsa.

Check your permissions. Also, if your home directory is mounted or linked from another location, I've seen issues. Please provide the following from the server-side:
ls -ld ~/.ssh
ls -l ~/.ssh/auth*
ls -l ~/.ssh/id*
cd ~/.ssh; pwd -P

---------- Post updated at 12:08 AM ---------- Previous update was at 12:01 AM ----------

Also, look into the ssh-copy-id script that is shipped with recent version of OpenSSH - it copies the identity file you specify and sets the proper permissions.

Code:
local $ ssh-copy-id -i ~/.ssh/id_dsa.pub me@myhost.org
me@myhost.org's password:
Now try logging into the machine, with "ssh 'me@myhost.org'", and check in:

  ~/.ssh/authorized_keys

to make sure we haven't added extra keys that you weren't expecting.

local $ ssh me@myhost.org hostname
myhost
local $

# 5  
Old 03-24-2011
Plesae find the screen shot
--------------------------------

machine from connect (gopc)
------------------------------
hyper72:~ 978$ ls -l ls -ld ~/.ssh
hyper72:~ 978$ ls -ld ~/.ssh
drwx------ 2 gopc ppusers 2048 Mar 20 23:48 /x/home/gopc/.ssh
hyper72:~ 979$ ls -l ~/.ssh/auth*
-rw------- 1 gopc ppusers 1988 Mar 18 03:41 /x/home/gopc/.ssh/authorized_keys
-rwxrwxrwx 1 gopc ppusers 607 Jan 2 06:03 /x/home/gopc/.ssh/authorized_keys.bak
hyper72:~ 980$ ls -l ~/.ssh/id*
-rw------- 1 gopc ppusers 668 Mar 17 20:51 /x/home/gopc/.ssh/id_dsa
-rw-r--r-- 1 gopc ppusers 602 Mar 17 20:51 /x/home/gopc/.ssh/id_dsa.pub
-rw------- 1 gopc ppusers 1671 Mar 18 03:40 /x/home/gopc/.ssh/id_rsa
-rwxrwxrwx 1 gopc ppusers 394 Mar 18 03:40 /x/home/gopc/.ssh/id_rsa.pub
hyper72:~ 981$ cd ~/.ssh; pwd -P
/x/home-new/gopc/.ssh
hyper72:~/.ssh 982$ pwd -P
/x/home-new/gopc/.ssh
hyper72:~/.ssh 983$ pwd
/x/home/gopc/.ssh
hyper72:~/.ssh 984$ com ssh



Machine to connect using id (different user id.)
stage2vm7116:~ 1001$ ls -ld ~/.ssh
drwxr--r-- 2 visaac users 2048 Mar 21 11:14 /x/home/visaac/.ssh
stage2vm7116:~ 1002$ ls -l ~/.ssh/auth*
-rwx------ 1 visaac users 996 Mar 17 20:58 /x/home/visaac/.ssh/authorized_keys
-rwxr--r-- 1 visaac users 447 Jan 4 2008 /x/home/visaac/.ssh/authorized_keys2
stage2vm7116:~ 1003$ ls -l ~/.ssh/id*
-rwx------ 1 visaac users 1675 Mar 21 11:11 /x/home/visaac/.ssh/id_rsa
stage2vm7116:~ 1004$ cd ~/.ssh; pwd -P
/x/home-new/visaac/.ssh
stage2vm7116:~/.ssh 1005$
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Ssh password

Hi there. I am fully aware of the security implications, but is there a way give a user password with the rsh and/or ssh commands? Such as: ssh user@192.168.0.56 -p password Or pass a config file to the command containing a password? I'm looking after a cluster and trying to use PSSH,... (6 Replies)
Discussion started by: MuntyScrunt
6 Replies

2. Red Hat

SSH password less setup asking for password

Hello Experts, when I am trying to connect my target server through sftp after creating ssh password less setup, it is asking for passowrd to connect. to setup this I followed below process: -->generated keys by executing the command "ssh-keygen -t rsa" -->this created my .ssh directory... (9 Replies)
Discussion started by: Devipriya Ch
9 Replies

3. Shell Programming and Scripting

Password in ssh

Hello Guys, I have a specific requirement where I need to provide password to ssh and sftp in my script on Solaris. I know password-less connection is the way without password but in my case, I cant use the same due to some limitations. Please let me know if we can tweak it. (7 Replies)
Discussion started by: Deei
7 Replies

4. Red Hat

ssh without password

Hi, I am trying to generate ssh without having to type a password. I have done this on numerous occasions using the procedure below and it has worked fine but not on this occasion. user1@sys1:ssh-keygen -t dsa -N "" <press enter for any questions> user1@sys1: ll .ssh/id_dsa.pub... (16 Replies)
Discussion started by: Duffs22
16 Replies

5. Solaris

Can't SSH log in without password.

I am working on Solaris 10 Sparc. While ssh trust relation building for SUN-CLUSTER on server, I am facing issue. I can log in from server2 to serer1 direactly but when i log in to server1 from server2 it prompts password. root@app1 # ssh app2 Last login: Wed Jul 27 14:08:14 2011... (0 Replies)
Discussion started by: anand87
0 Replies

6. UNIX for Dummies Questions & Answers

SSH with no password

How to setup SSH to not require a password when establishing an SSH connection from server A to server B for particular user? (4 Replies)
Discussion started by: sam101
4 Replies

7. Shell Programming and Scripting

SSH with password

Please help me I want connect to orther server using ssh. But I need to transfer password also without entering when it is prompts. Please help me. (1 Reply)
Discussion started by: saga499
1 Replies

8. Solaris

SSH Password-less login fails on password expiry.

Hi Gurus I have a few Sol 5.9 servers and i have enabled password less authentication between them for my user ID. Often i have found that when my password has expired,the login fails. Resetting my password reenables the keys. Do i need to do something to avoid this scenario or is this... (2 Replies)
Discussion started by: Renjesh
2 Replies

9. HP-UX

ssh without password

Hi, I have the necessity to run a korn shell on a remote server (both HP-UX servers) using the ssh command. The sintax that I use is ssh -l <remote user> <IP address of remote host> command(ksh script) Pressing enter I need to set the password of the remote user. Is it possible to... (2 Replies)
Discussion started by: gio123bg
2 Replies

10. UNIX for Dummies Questions & Answers

no password ssh

Hello all, I would like to know if anyone had ever set up a network in which they used DHCP and OPENSSH with no password. I can configure my ssh files to allow me to enter any machine without a password as long as I have generated the public and private keysa nd store them in my .ssh/aut... ... (3 Replies)
Discussion started by: larryase
3 Replies
Login or Register to Ask a Question