The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > AIX
Google UNIX.COM


AIX AIX is IBM's industry-leading UNIX operating system that meets the demands of applications that businesses rely upon in today's marketplace.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
XIO: fatal IO error 232 (Connection reset by peer) on X server "192.168.1.239:0.0" grimanda HP-UX 3 01-31-2008 07:33 AM
Development Releases: Linux Mint 4.0 Beta "Fluxbox", 4.0 Alpha "Debian" iBot UNIX and Linux RSS News 0 01-04-2008 11:00 AM
Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`" Lokesha UNIX for Dummies Questions & Answers 4 12-19-2007 09:52 PM
"syntax error at line 21 :'done' unexpected." error message" ibroxy Shell Programming and Scripting 3 08-08-2007 03:45 AM
Help! "Bus error" and "CPU Panic" box wont boot hcclnoodles SUN Solaris 3 10-05-2006 01:38 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-05-2007
Registered User
 

Join Date: Dec 2007
Posts: 53
Stumble this Post!
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!
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 12-05-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
Quote:
Originally Posted by rainbow_bean View Post
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".
Reply With Quote
  #3 (permalink)  
Old 12-05-2007
Registered User
 

Join Date: Dec 2007
Posts: 53
Stumble this Post!
$ 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
Reply With Quote
  #4 (permalink)  
Old 12-05-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
Quote:
Originally Posted by rainbow_bean View Post
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?
Reply With Quote
  #5 (permalink)  
Old 12-05-2007
Registered User
 

Join Date: Dec 2007
Posts: 53
Stumble this Post!
Quote:
Originally Posted by porter View Post
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?
Reply With Quote
  #6 (permalink)  
Old 12-05-2007
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Stumble this Post!
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
Reply With Quote
  #7 (permalink)  
Old 12-05-2007
Registered User
 

Join Date: Dec 2007
Posts: 53
Stumble this Post!
Thanks a lot! Success!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0