1828176 Members
2239 Online
109975 Solutions
New Discussion

ssh using private key

 
SOLVED
Go to solution
ITSD-ACCS
Frequent Advisor

ssh using private key

hi,

I was given a configure file eg user.cfg and this is what they call private key . May I know where should I put it and how to SSh to that host using this file ?

Thanks !
7 REPLIES 7
Arunvijai_4
Honored Contributor

Re: ssh using private key

Paste the contents of user.cfg (make sure it contains private key) into ~/.ssh/authorized_keys on the remote host.

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
ITSD-ACCS
Frequent Advisor

Re: ssh using private key

The connection is made from my host (client) to a remote site via ssh. According to your information, do you mean create a file called "authorized_key" ? under /.ssh in my host ?

Thanks !
Orhan Biyiklioglu
Respected Contributor

Re: ssh using private key

authorized_keys file must be placed under the .ssh directory in the home folder of the remote user. You must connect to the remote host first and put the contents of the file user.cfg into that file on the remote host.

hth
ITSD-ACCS
Frequent Advisor

Re: ssh using private key

I already copy the content user.cfg into authorized_keys, but didn't work.

Under .ssh I have :
>ls
authorized_keys
known_hosts
prng_seed

Then I type :
>sftp host124
Connecting to host123
ssh: connect to host xxx.xxx.xxx.xxx port 22: Connection refused
Connection closed

Orhan Biyiklioglu
Respected Contributor
Solution

Re: ssh using private key

This doesn't seem like an authentication problem. You could not establish a connection. Check whether the secure shell service is running or not.

ps -ef | grep sshd

and start it

/sbin/init.d/secsh start

if it is not already running.

hth.
ITSD-ACCS
Frequent Advisor

Re: ssh using private key

The problem is, the server side didn't start up their SSH services.
Orhan Biyiklioglu
Respected Contributor

Re: ssh using private key

As mentioned in the previous post...