Issue with SSH key


 
Thread Tools Search this Thread
Top Forums UNIX for Beginners Questions & Answers Issue with SSH key
# 1  
Old 05-07-2016
Question 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 authorized_keys .
Code:
diff id_rsa.pub authorized_keys

I have used this link

server1 , i have below contents

Code:
ls
authorized_keys  authorized_keys2  authorized_keys_back  id_dsa  id_dsa.pub  known_hosts  old_authorized_keys2  old_id_rsa.pub

and server2 i see as below
Code:
 ls
authorized_keys  authorized_keys2  authorized_keys_back  id_dsa  id_dsa.pub  known_hosts  old_authorized_keys2  old_id_rsa.pub

I hope i am clear on my questions , can someone help ?
# 2  
Old 05-07-2016
Do you wish to login in both directions (server1 > server2 and server2 > server1 ) without password ?

What issues are you having after key exchange ?
In the mentioned link, the key exchange is done one way not both.

If you have RSA generated, a simple one-liner could do the job, presuming permissions on $HOME $HOME/.ssh and content are in order.

Take a look at this post, or even entire topic, since user has similar question(s) :
https://www.unix.com/302949092-post3.html
# 3  
Old 05-08-2016
Quote:
Originally Posted by radha254
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 authorized_keys .
Code:
diff id_rsa.pub authorized_keys

I have used this link

server1 , i have below contents

Code:
ls
authorized_keys  authorized_keys2  authorized_keys_back  id_dsa  id_dsa.pub  known_hosts  old_authorized_keys2  old_id_rsa.pub

and server2 i see as below
Code:
 ls
authorized_keys  authorized_keys2  authorized_keys_back  id_dsa  id_dsa.pub  known_hosts  old_authorized_keys2  old_id_rsa.pub

I hope i am clear on my questions , can someone help ?
What version of openssh do you have in the machine which you are trying to connect to, via keys? The command rpmquery openssh will tell you, if in a RedHat comparable system, or maybe ssh -v.
If you have an openssh lower than version 3 , the following rules apply for the machine that you are trying to connect to:
$HOME/.ssh/authorized_keys2 to permit authentication for RSA with protocol SSH 1.3 and 1.5.
$HOME/.ssh/authorized_keys to permit authentication for DSA and RSA with protocol SSH 2.0.

Last edited by Aia; 05-08-2016 at 02:57 PM..
# 4  
Old 05-10-2016
Hello All ,

the issue was with the home directory (home dir CANNOT be group writable) of mine having 775 and change to 755 which resolved the issue .

can someone close this thread , i am not sure how to do that .
# 5  
Old 05-11-2016
Threads are not closed (will be done much later) but marked "solved" in the thread tags. Which I did for you.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

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... (4 Replies)
Discussion started by: powerAIX
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