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: 

ssh keys.

 
fizan
Super Advisor

ssh keys.

i have generated a public key and i uploaded in the destintion server in /home/test/.ssh/authorised_keys and the permission and ownership is to that test:test so its 600 authorised_keys and .ssh is 700 so after that also while connection it says as permission denied!! any configurations settings need to be changed?

Thanks..
7 REPLIES
R.K. #
Honored Contributor

Re: ssh keys.

Hi Fizan,

Attached an extract from SNA-2 dealing with ssh.

May be this is of some help.
Don't fix what ain't broke
Suraj K Sankari
Honored Contributor

Re: ssh keys.

HI,
Here is the Steps:
On the client run the following commands:

$ mkdir -p $HOME/.ssh
$ chmod 0700 $HOME/.ssh
$ ssh-keygen -t dsa -f $HOME/.ssh/id_dsa -P ''

This should result in two files, $HOME/.ssh/id_dsa (private key) and $HOME/.ssh/id_dsa.pub (public key).
Copy $HOME/.ssh/id_dsa.pub to the server.

On the server run the following commands:

$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys2
$ chmod 0600 $HOME/.ssh/authorized_keys2

Depending on the version of OpenSSH the following commands may also be required:
$ cat id_dsa.pub >> $HOME/.ssh/authorized_keys
$ chmod 0600 $HOME/.ssh/authorized_keys

An alternative is to create a link from authorized_keys2 to authorized_keys:
$ cd $HOME/.ssh && ln -s authorized_keys2 authorized_keys

On the client test the results by ssh'ing to the server:

$ ssh -i $HOME/.ssh/id_dsa server

(Optional) Add the following $HOME/.ssh/config on the client:

Host server
IdentityFile ~/.ssh/id_dsa

This allows ssh access to the server without having to specify the path to the id_dsa file as an argument to ssh each time.

Suraj
fizan
Super Advisor

Re: ssh keys.

while try connecting it shows as

Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Trying private key: ""
debug1: No more authentication methods to try.
Permission denied (publickey,gssapi-with-mic,password).
Unable to connect to the remote system, permission denied
The test of system [WEBSRV_aero] failed!




fizan
Super Advisor

Re: ssh keys.

hi Rk,

can you attach the gud docs its corrupted which u have provided.
Steven Schweda
Honored Contributor

Re: ssh keys.

There must be dozens (hundreds?) of threads
in this forum involving SSH configuration.
Did you read any of them?

> any configurations settings need to be
> changed?

Probably, but we non-psychics can't really
see what you have now. As usual, showing
actual commands with their actual output can
be more helpful than vague descriptions and
interpretations. "ls -l" is a good one.

> while try connecting it shows as

Is that output from "ssh -v [...]"? Where is
the rest of it?

> debug1: Trying private key: ""

That doesn't look like a good key file name.

> debug1: No more authentication methods to try.
> Permission denied (publickey,gssapi-with-mic,password).
> Unable to connect to the remote system, permission denied

I don't think that it's talking about file
permissions there, only the fact that you
couldn't authenticate.

> The test of system [WEBSRV_aero] failed!

Should that mean something to me? It
doesn't.
Steven E. Protter
Exalted Contributor

Re: ssh keys.

Shalom fizan,

Check your procedure against these two documents.

http://www.hpux.ws/?p=10

http://www.hpux.ws/?p=19

The first is relevant. The second is really cool to know.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
OldSchool
Honored Contributor

Re: ssh keys.

"Authentications that can continue: publickey,gssapi-with-mic,password
debug1: Trying private key: ""
debug1: No more authentication methods to try. .."

1) Well, how did you attempt to connect to it *exactly*. ssh or PuTTY or ??? What did you specify for the id file? You did specify one right?

2) It appears you've omitted some of the debug output...somewhere it should have told you that it attempted to connect using a public key "xxxx"?