passwordless ssh for non-root user???


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

who owns the authorized_keys file (should be oracle) and ... try to copy it and name it authorized_keys2 - that sometimes helps for reasons I do not know ...

What kind of security environment do you have - in my company you would have to have an accessroute defined between these hosts and public key authentication permitted for the user.

Regards
zxmaus
# 9  
Old 11-11-2010
Hey,

There could be two things:

1) check your sshd_config, maybe you are looking the file at the wrong place.

2) when you created your ssh key, did you put in a passphrase ? If so, you will need a ssh-agent to run with the ssh-key set into it.
# 10  
Old 11-11-2010
I use a similar setup between two AIX boxes. Here is what I see in the debug log when I ssh into the remote host:
Code:
> ssh -v hostB
OpenSSH_3.8.1p1, OpenSSL 0.9.6m 17 Mar 2004
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Failed dlopen: /usr/krb5/lib/libkrb5.a(libkrb5.a.so):   0509-022 Cannot load module /usr/krb5/lib/libkrb5.a(libkrb5.a.so).
        0509-026 System error: A file or directory in the path name does not exist.

debug1: Error loading Kerberos, disabling Kerberos auth.
debug1: Connecting to hostB [10.3.9.33] port 22.
debug1: Connection established.
debug1: identity file /home/userX/.ssh/identity type -1
debug1: identity file /home/userX/.ssh/id_rsa type 1
debug1: identity file /home/userX/.ssh/id_dsa type -1
debug1: Remote protocol version 1.99, remote software version OpenSSH_5.2
debug1: match: OpenSSH_5.2 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.8.1p1
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 'hostB' is known and matches the RSA host key.
debug1: Found key in /home/userX/.ssh/known_hosts:3
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: Offering public key: /home/userX/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 149
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.

In my experience with setting up the SSH key-based authentication, I found that the whole system is very strict about file permissions. Make sure you have the following file permissions on hostB:
Code:
~/.ssh/authorized_keys  600
~/.ssh                  700
~                       755

Note that home directory permissions are very important as well... if your home directory is writable by other users, SSHD would not accept the key.

HTH!
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