SSH has this error: "server refused our key"


 
Thread Tools Search this Thread
Operating Systems AIX SSH has this error: "server refused our key"
# 1  
Old 12-05-2007
SSH has this error: "server refused our key"

I did successful yestday as Porter's doc:


1. Create private/pub key on AIX:
$ssh-keygen -t identity

2. Get my private key from the AIX server, found in $HOME/.ssh/identity

Put that on Windows box.

I use WinSCP to transfer private key from AIX to Windows

3. Run puttygen.exe and load the private key, save it without password as identity.ppk in a safe directory.

4.To use SFTP use Putty's "psftp" as follows:

"c:\program files\putty\psftp.exe" -i \path\to\identity.ppk user@host

Then, it shows "server refused our key" and "Server refused public key", I have to input password to login AIX.

Yesterday, I thought I was successful to use WinSCP to do it without password, today, I cannot, and it shows the same result .

I don't change any configuration on AIX and Windows.

Who know why I cannot do it today?

Thanks a lot!
# 2  
Old 12-05-2007
Quote:
Originally Posted by rainbow_bean
1. Create private/pub key on AIX:
$ssh-keygen -t identity

2. Get my private key from the AIX server, found in $HOME/.ssh/identity
Did you put the public key in $HOME/.ssh/authorized_keys?

Do the files have -wr------ access rights?

I thought the flags would be "ssh-keygen -t rsa -f identity".
# 3  
Old 12-05-2007
$ ssh-keygen -t rsa -f identity
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in identity.
Your public key has been saved in identity.pub.
The key fingerprint is:
be:fe:1b:cc:ec:21:6b:d5:4d:db:75:00:99:92:8f:2d sss@server1
$ ls -l
total 16
-rw------- 1 sss staff 1675 Dec 05 13:21 identity
-rw-r--r-- 1 sss staff 397 Dec 05 13:21 identity.pub

It shows the same result, server refused our key
# 4  
Old 12-05-2007
Quote:
Originally Posted by rainbow_bean
It shows the same result, server refused our key
Have you put the public key in $HOME/.ssh/authorized_keys of the server you are trying to connect to?
# 5  
Old 12-05-2007
Quote:
Originally Posted by porter
Have you put the public key in $HOME/.ssh/authorized_keys of the server you are trying to connect to?
In AIX side, I only have

$ ls -l
total 16
-rw------- 1 sss staff 1675 Dec 05 13:21 identity
-rw-r--r-- 1 sss staff 397 Dec 05 13:21 identity.pub

after run the command:

$ ssh-keygen -t rsa -f identity

where the "$HOME/.ssh/authorized_keys"? In Windows or AIX?
I want to ssh without password from windows to AIX. So, I create the private/public key on AIX side?
# 6  
Old 12-05-2007
1. create public and private key on AIX - just as you have.

2. add the public key to $HOME/.ssh/authorized_keys on the AIX box.

3. ensure the keys and authorized_keys are -rw-------

4. transfer the private key to windows - just like you have

5. use puttygen to create a putty type key identity.ppk - just like you have

So you are nearly there, but the server does *nothing* with identity and identity.pub, they are ignored. It is only interested in $HOME/.ssh/authorized_keys. Similarly the ssh client on AIX is only interested in (a) $HOME/.ssh/identity and (b) $HOME/.ssh/known_hosts.

If $HOME/.ssh/authorized_keys does not exist then

Code:
cd .ssh
cp identity.pub authorized_keys
chmod 600 authorized_keys

# 7  
Old 12-05-2007
Thanks a lot! Success!
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

SSHd is running, but cant connect "Network error: Connection refused"

Hi, i checked on rhel VPS is running sshd (service ssh status) But i cant connect via putty: "Network error: Connection refused" Please which log file in my centos rhel linux i need to watch or what are steps to do to discover cause? (3 Replies)
Discussion started by: postcd
3 Replies

2. UNIX for Dummies Questions & Answers

What is the significance of sh -s in ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh?

Please can you help me understand the significance of providing arguments under sh -s in > ssh -qtt ${user}@${host} "sh -s "${version}"" < test.sh (4 Replies)
Discussion started by: Sree10
4 Replies

3. 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

4. HP-UX

Unable To Perform A "Passwordless" SSH Login To A Server

Greetings! I am trying to perform a passwordless SSH login from a HPUX 11.31 client to a HPUX 11.31 server. Whenever I do a "ssh -l root serverA" from the client, I am prompted for a password. Giving the password, I am able to successfully login. However I am trying to accomplish a... (9 Replies)
Discussion started by: Rob Sandifer
9 Replies

5. AIX

ssh public key auth "Remote login for account is not allowed" ?

Hello, Using AIX 6.1 boxes. User user1 connects from box A to box B using ssh. When password authentication is used everything is fine. When I configure user1 to use public key authentication sftp client works fine(no password asked), but ssh client fails. This is sshd log: Accepted publickey... (3 Replies)
Discussion started by: vilius
3 Replies

6. Shell Programming and Scripting

read -n1 -r -p "Press..." key / produces error in bash shell script

Hello! Sorry, for my not so perfect english! I want to stop bash shell script execution until any key is pressed. This line in a bash shell script read -n1 -r -p "Press any key to continue..." key produces this error When I run this from the command line usera@lynx:~$ read... (4 Replies)
Discussion started by: linuxinho
4 Replies

7. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

8. AIX

Ssh installation error "RSA key generation failed"

While trying to upgrade ssh from v4.7 to v5.0 on AIX 5.3 TL9, I end up with the following error. Has anyone come across this? Note: openssl has been upgraded to 0.9.8.840 before this upgrade Bala (0 Replies)
Discussion started by: balaji_prk
0 Replies

9. HP-UX

FTP large files - Getting "Connection Refused"

Hello Friends, When i trying to transfer a huge amount of files via FTP to a HP-Unx server, I am getting an error "Connection Refused"...! How can i avoid this error. Regards, Prakash K:b: (4 Replies)
Discussion started by: bullz26
4 Replies
Login or Register to Ask a Question