Advertisement

04.12.2005 at 08:53AM PDT, ID: 21385844
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

8.0

Setting up SFTP between two HPUX servers

Asked by edumgt in Unix Setup

Tags: ,

I am trying to setup an SFTP connection between two HPUX servers that authenticates using a public key.  I used the following command to geneerate the key pair and entered a passphrase:
ssh-keygen -t dsa -f test_key

Output:
Your identification has been saved in test_key.
Your public key has been saved in test_key.pub.
The key fingerprint is:
68:a2:60:e4:47:29:d6:0f:f4:98:8f:08:bc:24:6d:20 myuserid@serverA

I then copied the test_key.pub file to ~myuserid/.ssh on serverB and appended it to authorized_keys.
On serverA:
ls ~myuserid/.ssh
test_key
test_key.pub
known_hosts

On serverB:
ls ~myuserid/.ssh
test_key.pub
authorized_keys

From serverA I ranthe following command to connect to serverB using sftp:
sftp -v -oIdentityFile=~/.ssh/test_key myuserid@serverB

Output:
Connecting to serverB...
OpenSSH_3.9, OpenSSL 0.9.7d 17 Mar 2004
HP-UX Secure Shell-A.03.91.002, HP-UX Secure Shell version
debug1: Reading configuration data /opt/ssh/etc/ssh_config
debug1: Connecting to serverB [xxx.xx.xx.xxx] port 22.
debug1: Connection established.
debug1: identity file /usr/relids/myuserid/.ssh/test_key type 2
debug1: Remote protocol version 2.0, remote software version OpenSSH_3.9
debug1: match: OpenSSH_3.9 pat OpenSSH*
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_3.9
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 'serverB' is known and matches the RSA host key.
debug1: Found key in /usr/relids/myuserid/.ssh/known_hosts:1
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: Offering public key: /usr/relids/myuserid/.ssh/test_key
debug1: Authentications that can continue: publickey,password,keyboard-interactive
debug1: Next authentication method: keyboard-interactive
Password:  (I enter my password here)
debug1: Authentication succeeded (keyboard-interactive).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
Connection to serverB closed by remote host.
debug1: Transferred: stdin 0, stdout 0, stderr 45 bytes in 0.0 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 1401.6
debug1: Exit status -1
Connection closed

Here is the output from the syslog on serverB:
serverB sshd[20819]: Authentication refused: bad ownership or modes for directory /usr/relids/myuserid/.ssh
serverB sshd[20819]: Accepted keyboard-interactive/pam for myuserid from xxx.xx.xx.xxx port 59109 ssh2

There are two problems here, first it prompts for a password and doesn't authenticate with the public key (this is my main problem).  Second, when I do type my password the connection is closed.  As I said earlier my goal is to connect using the public key to authenticate, however I am also interested as to why this connection is dropping.  My thought is I am missing something small and trivial but cannot figure out what it is, any help would be appreciated.

ThanksStart Free Trial
 
Loading Advertisement...
 
[+][-]04.12.2005 at 01:43PM PDT, ID: 13767025

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Unix Setup
Tags: sftp, setup
Sign Up Now!
Solution Provided By: tfewster
Participating Experts: 1
Solution Grade: C
 
 
[+][-]04.13.2005 at 07:42AM PDT, ID: 13772797

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.18.2005 at 12:52PM PDT, ID: 13809692

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.19.2005 at 09:27AM PDT, ID: 13817026

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42