Report this

What is the reason for this report?

Cant connect to my VPS from Ubuntu Terminal

Posted on January 28, 2016

im try connect to my server using ubuntu terminal

ssh -p 2222 -i mypublickey.ppk username@ip

then its ask “Enter passphrase for key ‘mypublickey.ppk’:”

Im entering my password but its always wrong then i got error Permission denide (publickey).

i have no problem if connect from Putty ubuntu or windows



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

From the error message, it sounds like you have a key pair associated with the account you are trying to log in to and the Ubuntu machine you are on. The private key is encrypted with a passphrase, so before it can be used to sign you in, you need to provide the passphrase to decrypt it. This passphrase is different from the password on the server that you are using when logging in with PuTTY.

To force a password-based login, use: ssh -o PreferredAuthentications=password -o PubkeyAuthentication=no user@hostname.com

If you don’t remember the passphrase, you’ll need to remove the id_rsa and id_rsa.pub or id_dsa and id_dsa.pub files from your ~/.ssh directory on the local machine and/or remove the associated key from the .ssh/authorized_keys file on the server. Once you do that, you’ll default to password-based login.

http://askubuntu.com/questions/726616/cant-connect-to-my-vps-from-ubuntu-terminal I need to convert the PPK key to openssh format. sudo apt-get install putty-tools puttygen mypublickey.ppk -O private-openssh -o mypublickey

then connect

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.