Operating System - HP-UX
1833687 Members
4087 Online
110062 Solutions
New Discussion

Re: SSH public key authentication

 
R.SRIDHAR
Occasional Advisor

SSH public key authentication

while configuring the ssh public key authentication. I am not able to understand the step given in http://docs.hp.com/en/5991-7493/ch04s03.html step no 4 i tryed to run this command but giving error message help me
8 REPLIES 8
Jeeshan
Honored Contributor

Re: SSH public key authentication

Hi Sridhar

What kind of error messages you have found?
a warrior never quits
Jeeshan
Honored Contributor

Re: SSH public key authentication

Hi again

You need to run this command in ssh server.
a warrior never quits
Yogeeraj_1
Honored Contributor

Re: SSH public key authentication

hi,


Copy the public key in the client system to the home directory of the server using the following command:


# cat $HOME/.ssh/id_dsa.pub â ssh remoteuser@remotehost
â cat - >> $HOME/.ssh/authorized_keysâ




First of all, you run this command on the server where you have created the public key using the "ssh-keygen -t [rsaâ dsa]" command.


what the "cat" command does, it appends the public key in the $HOME/.ssh/authorized_keys of the "remotehost" for user "remoteuser".


What error are you getting?

revert!

kind regards
yogeeraj

No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Yogeeraj_1
Honored Contributor

Re: SSH public key authentication

hi again,

to further troubleshoot this, run the following commands to verify that you are able to connect to the remote host:

ping remotehost
ssh remoteuser@remotehost

if these commands work, then you will be able to successfully complete this step(4).


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
R.SRIDHAR
Occasional Advisor

Re: SSH public key authentication

when i trying to run the step4 command it is giving sh hostname not found..
Jeeshan
Honored Contributor

Re: SSH public key authentication

Tell me what is the output of this command in ssh server.

#cat $HOME/.ssh/id_rsa.pub | ssh @ 'cat - >> $HOME/.ssh/authorized_keys'

Don't forget to assign points!!!!;-)
a warrior never quits
Yogeeraj_1
Honored Contributor

Re: SSH public key authentication

>when i trying to run the step4 command it is giving sh hostname not found..

what does the following command return to you?

ping hostname


if the hostname is not found in the DNS or /etc/hosts, you will have to include it there.

e.g. (extract from /etc/hosts)
192.168.111.23 hostname


kind regards
yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
Steven Schweda
Honored Contributor

Re: SSH public key authentication

> when i trying to run the step4 command it
> is giving sh hostname not found..

What is the exact command which you run, and
what, exactly, is the error message?

This new copy+paste stuff can be very useful
in cases like this.