HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
cancel
Showing results for 
Search instead for 
Did you mean: 

sftp on hp-ux 11.23

 
SOLVED
Go to solution
Aaron Ooi
Occasional Advisor

sftp on hp-ux 11.23

Hi all,

I`m having an error as below:-

openssh version
+++++++++++++++
$ ssh -v
OpenSSH_4.4p1-hpn12v11, OpenSSL 0.9.7l 28 Sep 2006
HP-UX Secure Shell-A.04.40.011, HP-UX Secure Shell version

I have set it to verify with the public/private key. For the meantime i just use the sftp to sftp back the same server before publich the key to the client server.

No matter what key i generate it keep on asking for passphrase, i didn`t specific any passphrase when generating the key. I have generated rsa1, rsa and dsa key for testing but there is no luck. I have use puttygen generate the key and transfer to the unix machine, it still no luck.

I have also set the file permission according to the requirement.

Below is the message i get with -v option.
$ sftp -v -oIdentityFile=~/.ssh/wmdvadm-private.ppk wmdvadm@10.100.22.41
Connecting to 10.100.22.41...
OpenSSH_4.4p1-hpn12v11, OpenSSL 0.9.7l 28 Sep 2006
HP-UX Secure Shell-A.04.40.011, HP-UX Secure Shell version
debug1: Reading configuration data /home/wmdvadm/.ssh/config
debug1: Applying options for *
debug1: Connecting to 10.100.22.41 [10.100.22.41] port 22.
debug1: Connection established.
debug1: identity file /home/wmdvadm/.ssh/wmdvadm-private.ppk type -1
debug1: Remote protocol version 2.0, remote software version OpenSSH_4.4p1-hpn12v11
debug1: match: OpenSSH_4.4p1-hpn12v11 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_4.4p1-hpn12v11
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: server->client aes128-cbc hmac-md5 none
debug1: kex: client->server aes128-cbc hmac-md5 none
debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP
debug1: SSH2_MSG_KEX_DH_GEX_INIT sent
debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY
debug1: Host '10.100.22.41' is known and matches the RSA host key.
debug1: Found key in /home/wmdvadm/.ssh/known_hosts:4
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: publickey
debug1: Trying private key: /home/wmdvadm/.ssh/wmdvadm-private.ppk
debug1: PEM_read_PrivateKey failed
debug1: read PEM private key done: type
Enter passphrase for key '/home/wmdvadm/.ssh/wmdvadm-private.ppk':
debug1: No more authentication methods to try.
Permission denied (publickey,password,keyboard-interactive).
Connection closed
4 REPLIES
Steven Schweda
Honored Contributor

Re: sftp on hp-ux 11.23

> debug1: Next authentication method: publickey
> debug1: Trying private key: /home/wmdvadm/.ssh/wmdvadm-private.ppk
> debug1: PEM_read_PrivateKey failed
> debug1: read PEM private key done: type

I don't know what's in "wmdvadm-private.ppk",
but the SSH software seems not to like it.

> I have use puttygen generate the key and
> transfer to the unix machine, it still no
> luck.

Why not use ssh-keygen on the HP-UX system to
generate some key files? You might then
compare these key files with what's in the
".ppk" file (about which I know nothing).
Matti_Kurkela
Honored Contributor
Solution

Re: sftp on hp-ux 11.23

.ppk is "PuTTY Private Key", a SSH private key file format used by free GUI SSH clients PuTTY and WinSCP, and certain other software that uses PuTTY's SSH code library.

This key file format is not directly compatible with OpenSSH. Normally this is not a problem, because PuTTYgen, the key generator utility for PuTTY, can convert the key to the desired format.

In Windows, load the .ppk file in PuTTYgen, then use Conversions -> Export. You should export the private key to OpenSSH format.

If you use the Unix port of PuTTY (available on some Linux distributions), the key can be converted with a command like:

puttygen wmdvadm-private.ppk -O private-openssh -o wmdvadm-private-openssh

(I'm not sure, but I think the Windows PuTTYgen might accept these command line options too?)

After the export operation, you should have a private key file that is compatible with HP/OpenSSH sftp.

MK
MK
Aaron Ooi
Occasional Advisor

Re: sftp on hp-ux 11.23

Thx for the feedback, it was due to the firewall issue where the client machine port 22 is not open for the communication. After change the firewall rule all is working fine now.
Aaron Ooi
Occasional Advisor

Re: sftp on hp-ux 11.23

The problem due to the network firewall rules