ssh without password

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat ssh without password
# 1  
Old 12-02-2011
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.

Code:
user1@sys1:ssh-keygen -t dsa -N ""
<press enter for any questions>
user1@sys1: ll .ssh/id_dsa.pub
Copy id_dsa.pub file onto sys2 into /tmp dir
user2@sys2: mkdir -p .ssh
user2@sys2:cd .ssh
user2@sys2:cat /tmp/id_dsa.pub >> authorized_Keys

Any ideas why it still prompts for a password?

Regards,
D.
# 2  
Old 12-02-2011
Capital K on authorized_keys?
# 3  
Old 12-02-2011
apologies, that is a typo - lower case k.
# 4  
Old 12-02-2011
Code:
ph34r# mkdir ~/.ssh
ph34r# chmod 700 ~/.ssh
ph34r# cd ~/.ssh
ph34r# ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key ("your_local_home"/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again: 
Your identification has been saved in id_rsa.
Your public key has been saved in id_rsa.pub.
The key fingerprint is:
17:5a:e7:77:ad:2c:0b:8e:f3:97:f8:20:53:79:69:55 root@ph34r

ph34r# scp ~/.ssh/id_rsa.pub jimbo@l0ath1ng.tehinterweb.net:/home..._rsa.ph34r.pub
ph34r# ssh jimbo@l0ath1ng.tehinterweb.net
Password:
% mkdir .ssh
% chmod 700 .ssh
% cat id_rsa.ph34r.pub >> .ssh/authorized_keys
% chmod 644 .ssh/authorized_keys

Moderator's Comments:
Mod Comment Please use code tags!

Last edited by zaxxon; 12-06-2011 at 05:52 AM.. Reason: code tags, see PM
# 5  
Old 12-02-2011
ssh-copy-id
This User Gave Thanks to mark54g For This Post:
# 6  
Old 12-05-2011
Hi,

I have used the ssh-copy-id with the following result.....

Code:
[oracle@node1 .ssh]$ ssh-copy-id -i id_dsa.pub node2
oracle@node2 password: 
Now try logging into the machine, with "ssh node2'", and check in:
  .ssh/authorized_keys
to make sure we haven't added extra keys that you weren't expecting.
[oracle@node1 .ssh]$ ssh node2
oracle@node2's password:

......still requesting a password.

R,
D.
# 7  
Old 12-05-2011
What does ssh -v node2 say?
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. 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

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

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

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

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

9. UNIX for Advanced & Expert Users

SSH - Prompting for password

Hi, Can anybody tell me a way to do ssh , without prompting for password from keyboard, Using RSA. The requirement is I need to create the key , using passphrase also..... Is there any way to do it in UNIX ? I am doing it from AIX machine , but remote machine is Linux I tried... (8 Replies)
Discussion started by: shihabvk
8 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