1

When I try to execute the command ssh -vvv user@ip_address, the last few lines of the outcome looks as below:

debug3: send packet: type 50

debug2: we sent a publickey packet, wait for reply

debug3: receive packet: type 51

debug1: Authentications that can continue: publickey

debug2: we did not send a packet, disable method

debug1: No more authentication methods to try.

user@ip_address: Permission denied (publickey).

I have tried using Putty as well and verified the public key under /home/username/.ssh/authorized_keys. How can I resolve this?

Worthwelle
  • 4,538
  • 11
  • 21
  • 32

1 Answers1

0

Finally, got it resolved. Tried the following steps:

  1. Copied the folders under /root/.ssh to /home/username/.ssh .

  2. Changed the permission of .ssh to 700 and the files under it to 644.

  3. In the local machine, i did "conversions-->export openssh key" from putty gen in the screen displaying my public key, which was generated from putty gen earlier.

  4. Copied the openssh key to ~/.ssh/ and then copied the file content to id_rsa under the same path,i.e. .ssh

  5. Created a config file under .ssh , which looks like below :

    #!/bin/sh
    Hostname ip_address of remote server
    User username
    PubKeyAuthentication yes
    IdentityFile ~/.ssh/id_rsa
    
  6. And finally tried to connect using the command

    ssh -vvv username@remoteserver_ip_address
    
Kenster
  • 7,483
  • 2
  • 32
  • 44