SSH key issue


 
Thread Tools Search this Thread
Operating Systems AIX SSH key issue
# 1  
Old 08-26-2016
SSH key issue

Hello

I have AIX server as a source server and destination is Linux server. I have configured the ssh key as below....
generated rsa key on aix with userA and copied the public key to
on linux server in userB/.ssh/authorized_keys
but when i try ssh userB@linux server its again asks me for pasword.

AIX server "7100-03-04" and Linux server "RHEL 6.7"

please suggest.

Last edited by powerAIX; 08-26-2016 at 10:29 AM.. Reason: updating os version
# 2  
Old 08-26-2016
Where is your private key stored?
What are the permissions of .ssh/authorized_keys?
Is the sshd on linux configured correctly?
# 3  
Old 08-31-2016
The public key and private key is in users home directory .ssh folder.
The same configuration is working for aix to aix server, linux to linux and also linux to aix but it is not working for aix to linux.
# 4  
Old 09-05-2016
Is it actually asking for a passphrase rather than a password?

Can you show us listings from:-
  • AIX, userA
  • Linux, userB

The listing would be ls -la .ssh

You could also try:-
Code:
ssh -v userB@Linux

.... and that might give a few more clues.



Robin
# 5  
Old 09-05-2016
Common problems/misunderstandings with ssh (no intention of completeness):

1) directory permissions:
Note that the directory in which the ssh-files in your homedir reside (per default $HOME/.ssh) has to be owned by you and have filemode 700.

2) file permissions:
The file $HOME/.ssh/authorized_keys has to be owned by the user and has to have a filemode of 600.

3) ssh-keys are one-way only!
If you create a key on sys1 as user1 and store it in $HOME/.ssh/authorized_keys of user2 on sys2 that means that you can connect as user1@sys1 to sys2 as user2, BUT NOT THE OTHER WAY ROUND! If you want this too, then create a key on sys2 as user2 and put this in the respective file of user1 on sys1.

4) Sessions are cancelled for no apparent reason
SSH (the daemon, not the client) might be configured to kill sessions which have no traffic for a certain amount of time. If you do not want this but cannot guarantee that your session always experiences minimum traffic (i.e. some installers may be silent for quite some while) put the following into the file $HOME/.ssh/config

Code:
# Enable keep-alive packets
Host *
     ServerAliveInterval 15
     ServerAliveCountMax 21600

5) after an LPM operation ssh complains about duplicate hosts and terminates
An LPM (live partition mobility) operation changes the (hardware-based) host identification and therefore the ssh thinks it sees a new host with an IP address of the old host. You can easily solve this by removing the entry in the file $HOME/.ssh/known_hosts, but this is cumbersome. If you do not want this to lead to the termination of the connection attempt you can add the line:

Code:
# Enable keep-alive packets
Host *
     ServerAliveInterval 15
     ServerAliveCountMax 21600
     StrictHostKeyChecking no

to your $HOME/.ssh/config file.

I hope this helps.

bakunin
This User Gave Thanks to bakunin For This Post:
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Issue with SSH key

Hello All , I am trying to set up the keys to login seamless on to two diff environment server(s). i used to have it couple of years back , but somehow never worked and didn`t concentte much , but when i want to setup again . facing a challange while copying the id_rsa.pubfile to... (4 Replies)
Discussion started by: radha254
4 Replies

2. Red Hat

Ssh-key issue

Hi all, I have generated pass phrase key from Linux and copied into windows system. Then now we cant login to Linux from windows without that pass phrase key, unfortunately i forgot the pass phrase key. I have tried below procedures to recover it. 1. Have regenerated the id_RSA key again... (3 Replies)
Discussion started by: mastansaheb
3 Replies

3. Cybersecurity

get ssh key comment

Hey Guys, I have a server, and a technical user on it (only for reading logs). I set up openssh, and the user can login only with ssh key pair. Under this one technical user, there are a lots of public keys in the ~/.ssh/authorized_keys file. I would like to find out/log with which key the user... (3 Replies)
Discussion started by: lyynxxx
3 Replies

4. Solaris

Solaris 8 ssh public key authentication issue - Server refused our key

Hi, I've used the following way to set ssh public key authentication and it is working fine on Solaris 10, RedHat Linux and SuSE Linux servers without any problem. But I got error 'Server refused our key' on Solaris 8 system. Solaris 8 uses SSH2 too. Why? Please help. Thanks. ... (1 Reply)
Discussion started by: aixlover
1 Replies

5. Red Hat

SSH Public key Authentication Issue

Hi All; I have an issue with password less authentication via ssh ( v2) I have two servers Server A and Server B, following are the server details Server A OS - HP UX B.11.11 U 9000/800 SSH - OpenSSH_4.3p2-hpn, OpenSSL 0.9.7i 14 Oct 2005 HP-UX Secure Shell-A.04.30.000, HP-UX... (3 Replies)
Discussion started by: maverick_here
3 Replies

6. Shell Programming and Scripting

Using ssh to add register key on ssh server

Hi, I want to use ssh to add a register key on remote ssh server. Since there are space characters in my register key string, it always failed. If there is no space characters in the string, it worked fine. The following is what I have tried. It seems that "ssh" command doesn't care about double... (9 Replies)
Discussion started by: leaftree
9 Replies

7. UNIX for Advanced & Expert Users

ssh key

Hi all, I have a sshkey which I use to connect from my unix box to a linux box without any issue...... however I downloaded this same key to my laptop and tried to connect to the same linux box but it failed..... As my laptop is running MS Vista I guessing I going have to convert it ...... (1 Reply)
Discussion started by: Zak
1 Replies

8. UNIX for Advanced & Expert Users

SSH - Public key

When should one have to generate a public key on a Server when the public key is already created and used by other clients? Thanks, Rahul. (6 Replies)
Discussion started by: rahulrathod
6 Replies

9. Cybersecurity

SSH key code versus server key code

Hi, When logging in using SSH access (to a remotely hosted account), I received a prompt to accept a server's key fingerprint. Wrote that string of code down for comparision. Already emailed my host for their listing of the string of code for the server's key fingerprint (for comparison,... (1 Reply)
Discussion started by: Texan
1 Replies

10. AIX

key ssh

hello I want to connect from server1 to server2 (Aix 5.3) with ssh, without password prompt. So i define a ssh-key On server1: ssh-keygen -b 1024 -f identity -P '' -t dsa scp identity.pub toto@server2:/tmp/identity-.pub On server 2: cat identity-.pub >> .ssh/authorized_keys chmod 400... (2 Replies)
Discussion started by: pascalbout
2 Replies
Login or Register to Ask a Question