passwordless ssh for non-root user???


 
Thread Tools Search this Thread
Operating Systems AIX passwordless ssh for non-root user???
# 1  
Old 11-09-2010
passwordless ssh for non-root user???

hi all

I have a problem to set up the password ssh login for a non-root user. what I want to do is that non-root user in host A logs into host B without password prompted.

what I did listed as the following steps.

1. genarate a pair of keys from host A.
Code:
ssy-keygen -t rsa -N "" -f ~/.ssh/id_rsa

2.copy the public key to host B
Code:
scp -p ~/.ssh/id_rsa/pub hostb:~/.ssh/id_rsa.`hostname`.pub

3.create the authorized_key file from the public key
Code:
cat ~/.ssh/id_rsa.hostb.pub >> ~/.ssh/authorized_keys

after that, i have checked the permission both host A and host B. the .ssh has 700 in both hosts and the private key in host A has 600 and the authorized_keys in host B has 644.

when I tested the ssh connection, it still looks like this.

Code:
ontstcerwpar1racle.:/home/oracle/.ssh>ssh -v ontstcer2
OpenSSH_5.0p1, OpenSSL 0.9.8h 28 May 2008
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: init_func_ptrs success
debug1: Value of krb5 is 1
debug1: Value of gssapi is 1
debug1: Connecting to ontstcer2 [172.15.103.87] port 22.
debug1: Connection established.
debug1: identity file /home/oracle/.ssh/identity type -1
debug1: identity file /home/oracle/.ssh/id_rsa type 1
debug1: identity file /home/oracle/.ssh/id_dsa type 2
debug1: Remote protocol version 1.99, remote software version OpenSSH_5.0
debug1: match: OpenSSH_5.0 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host 'ontstcer2' is known and matches the RSA host key.
debug1: Found key in /home/oracle/.ssh/known_hosts:1
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/oracle/.ssh/identity
debug1: Offering public key: /home/oracle/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Offering public key: /home/oracle/.ssh/id_dsa
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: password
oracle@ontstcer2's password:

any idea why this happens?

thanks in advance,

Frank

Last edited by Scott; 11-09-2010 at 11:35 AM.. Reason: Use code tags, please...
# 2  
Old 11-09-2010
It might be an older version of SSH demanding DSA keys instead of RSA ones.
This User Gave Thanks to Corona688 For This Post:
# 3  
Old 11-09-2010
i tried them all. none of them worked.
# 4  
Old 11-09-2010
I think what you need, is to run ssh-agent.

I have a user that logs in without supplying a passphrase or a password, but when I first log in I run ssh-agent to cache the passphrase in memory.

If in fact you are using AIX, you might try:

Code:
   
   HOME=/
   export HOME
   /usr/local/bin/keychain $HOME/.ssh/id_rsa $HOME/.ssh/id_dsa
   . $HOME/.ssh-agent-$(hostname)

# 5  
Old 11-09-2010
this command /usr/local/bin/keychain does not exit in AIX.

but I did checked the HOME for oracle user. it shows correct.
# 6  
Old 11-09-2010
Try 'find'ing keychain.
# 7  
Old 11-09-2010
I did a gloable search for this file and found nothing.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Passwordless ssh for different user

Hello Folks, I lost touch in ssh key gen topics. I am in need of ssh to a server without password, kindly help me in configuring. I have two servers, server1 with user name apha & server1 with user name beta. I need to ssh to the server2 from server1 with respective users, Manually i... (3 Replies)
Discussion started by: Thala
3 Replies

2. Red Hat

Limit root user of SSH logins

Hi team, I tried to modify the /etc/security/limits.conf file to limit the root user for more one login. I added the line in limits.conf file like: @root hard maxlogins 1 I also tried to modify /etc/ssh/sshd_config to limit the root userlogin by adding this: ... (10 Replies)
Discussion started by: leo_ultra_leo
10 Replies

3. Solaris

Passwordless ssh for root

Hi Experts, I am trying to setup passwordless ssh for root between two of my solaris servers(say A & B). I have exchanged the public keys between both servers. Password less ssh working fine while I try to connect from Server A to Server B. However it is still asking password... (6 Replies)
Discussion started by: sai_2507
6 Replies

4. AIX

passwordless entry using ssh from one user to a different user on the same server

Hi, We have a requirement to do passwordless entry from one user to a different user on the same AIX server using ssh keys. Can some one help me with this? Thanks in advance, Panditt (3 Replies)
Discussion started by: deshaipet
3 Replies

5. Shell Programming and Scripting

passwordless ssh

My main concern is, i have to login into 300 linux server and all are having same userid and password. I dont want to create any key for each server to login . Is there a way to run the shell script ? (3 Replies)
Discussion started by: Mani2512
3 Replies

6. Shell Programming and Scripting

Cron job initiating ssh AND sudo (from user, not root)

I've been bashing my head on the desk for 2 days trying to get this to work, but I've had no luck. I'll try to be as clear as possible in my explanation without dragging out the details. I'm trying to set up a cron job for user "john" which runs a script. This script initiates an ssh connection to... (5 Replies)
Discussion started by: eh3civic
5 Replies

7. UNIX for Dummies Questions & Answers

passwordless ssh

hi, i have tried with passwordless shh in google.. i followed the below steps ... user:~> ssh-keygen -t rsa Enter file in which to save the key (/home/cantin/.ssh/id_rsa):key.txt Enter passphrase (empty for no passphrase): Enter same passphrase again: till this step i... (0 Replies)
Discussion started by: arunmanas
0 Replies

8. HP-UX

Help on passwordless ssh...

Hi, Can someone help me on ssh-keygen usage...? I used ssh-keygen after which "id.pub" file was generated in system1's > .ssh directory... I copied the same into the remote system system2 > .ssh directory as "authorized_keys" file. Now i tried ssh connection from system 1 to system... (7 Replies)
Discussion started by: EmbedUX
7 Replies

9. Solaris

How to configure ssh for root user....???

Hi Friends, I would like to configure ssh for root user. Note : I am able to use the ssh for other user. Can someone suggest me what needs to be done....??? Thanks & Regards, jumadhiya. (8 Replies)
Discussion started by: jumadhiya
8 Replies

10. AIX

Passwordless root authentication via SSH

Hello, I would like to issue a couple of commands as root on a remote machine without having to enter the root password. I used "ssh-keygen -t rsa" to generate the encryption keys, copied the public key to the remote machine, etc. I also tried playing around with the sshd_config file and... (3 Replies)
Discussion started by: sphericon
3 Replies
Login or Register to Ask a Question