SSH Keys between RHEL 5 and Solaris 10

 
Thread Tools Search this Thread
Operating Systems Linux Red Hat SSH Keys between RHEL 5 and Solaris 10
# 8  
Old 11-11-2011
It most certainly can be done!

Code:
$ hostname
rhel1

$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/scott/.ssh/id_rsa):
Created directory '/home/scott/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/scott/.ssh/id_rsa.
Your public key has been saved in /home/scott/.ssh/id_rsa.pub.
The key fingerprint is:
12:02:77:22:be:6a:47:7d:aa:92:d6:8b:ac:56:07:ee scott@rhel1


$ cat .ssh/id_rsa.pub | ssh scott@sol10_1 'cat >> .ssh/authorized_keys'
The authenticity of host 'sol10_1 (sol10_1)' can't be established.
RSA key fingerprint is c5:67:11:23:ba:52:be:b7:1c:e0:d5:69:c9:b4:dc:24.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'sol10_1' (RSA) to the list of known hosts.
Password: *********
$

$ ssh scott@sol10_1
Last login: Fri Nov 11 09:52:37 2011 from rhel1
$ hostname
sol10_1

I would remove the key from the authorized_keys file on your Solaris server, and start again.

I set this up first time, with no issues whatsoever.
# 9  
Old 11-11-2011
Thanks Scott.

I followed your method exactly but I still get prompted for a password.

Then I tried to do it with a different user and got it to work first time. Smilie
The only difference that I can see that could possible cause a problem is that the user I'm not having any success with has a numerical value as the first character of the user name. eg: 5chsuser

Do you think this could be a problem?
# 10  
Old 11-11-2011
Most likely. How did you create this user on Solaris?

Code:
root@sol10_1 (global) # useradd -u 140123 -g 10 -d /home/5cott -s $(which ksh) 5cott
UX: useradd: 5cott name first character should be alphabetic.

# 11  
Old 11-11-2011
Quote:
Originally Posted by Scott
Most likely. How did you create this user on Solaris?

Code:
root@sol10_1 (global) # useradd -u 140123 -g 10 -d /home/5cott -s $(which ksh) 5cott
UX: useradd: 5cott name first character should be alphabetic.

On the Solaris machine it gave me that message about the first character but still created the user.
I used the same user to set up ssh keys between two Solaris machines and it worked successfully. So maybe it is just a RHEL issue. I tried doing it with the same user between two Redhat machines and it also doesn't work Smilie
# 12  
Old 11-11-2011
Ha ha. You're right. I didn't notice it had created the user anyway.

I just repeated the process with the new user 5cott and it worked fine too.

Are you sure you copied the correct key to the correct place for the correct users?
# 13  
Old 11-11-2011
i tested from linux to Solaris and vice verse is working for me without any issue's

Last edited by venikathir; 11-11-2011 at 08:55 AM.. Reason: typo
# 14  
Old 11-14-2011
Quote:
Originally Posted by Scott
Ha ha. You're right. I didn't notice it had created the user anyway.

I just repeated the process with the new user 5cott and it worked fine too.

Are you sure you copied the correct key to the correct place for the correct users?
I'm 100% sure my man. I think what I'll do is just delete the user and recreate it.
Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Find active SSH servers w/ ssh keys on LAN

Hi, I am trying to complete my bash script in order to find which SSH servers on LAN are still active with the ssh keys, but i am frozen at this step: #!/bin/bash # LAN SSH KEYS DISCOVERY SCRIPT </etc/passwd \ grep /bin/bash | cut -d: -f6 | sudo xargs -i -- sh -c ' && cat... (11 Replies)
Discussion started by: syrius
11 Replies

2. Solaris

help with SSH keys

Hello, I could use some help with my ssh keys and agent. This is the issue. I have 2 different UNIX systems at work. One is the normal Solaris servers with my uid being the same throughout all the servers. I now have a different system for my desktop. A contractor came in and installed some SUN... (0 Replies)
Discussion started by: bitlord
0 Replies

3. Red Hat

cannot ssh (use NFS) on RHEL box, but can mount external & ssh out of RHEL box

Ok, Im trying to get NFS working on my RHEL 5 box, apparently i can use the box as a client, but not as a server. If it helps i cant ssh into the box (server), but as a client ssh works fine. Ive configured server: /etc/hosts.allow: all : all all :all@all setup my /etc/exports file... (4 Replies)
Discussion started by: drs.grid
4 Replies

4. Shell Programming and Scripting

What are public keys in ssh and how do we create the public keys??

Hi All, I am having knowledge on some basics of ssh and wanted to know what are the public keys and how can we create and implement it in connecting server. Please provide the information for the above, it would be helpful for me. Thanks, Ravindra (1 Reply)
Discussion started by: ravi3cha
1 Replies

5. UNIX for Dummies Questions & Answers

ssh keys monitoring

Hi, I have ssh keys (id_rsa and id_rsa.pub). However, every once in a while, someone deletes these keys. here's what i want to do : 1. on my server, it will ssh user@password into the target machine(where ssh keys are located). 2. check the date/filesize of id_rsa, id_rsa.pub). 3.... (0 Replies)
Discussion started by: tungaw2004
0 Replies

6. UNIX for Dummies Questions & Answers

SSH keys

Hi everyone, i wanted to generate ssh keys so that i can include the public key in the remote sever, so that for subsequent logins, i can do away with the keying in of the password. I consulted the man ssh-keygen man pages. "..Normally each user wishing to use SSH with RSA or DSA... (1 Reply)
Discussion started by: new2ss
1 Replies

7. UNIX for Advanced & Expert Users

SSH Keys Help

Hello, I'm wondering if anyone has a step-by-step instruction set for setting up ssh keys? I've gone through many of the manuals online (most seem to be from the same source) and it's a little bit unclear when the documentation is talking about the server versus the client machine. I'm missing... (1 Reply)
Discussion started by: sysera
1 Replies
Login or Register to Ask a Question