How to actually connect to my vps via Chromebook - vps

I've been trying for a while now to connect to my Digital Ocean VPS via my Chromebook. This is for development when away from my desktop.
I'd prefer to use mosh so I've tried downloading mosh and using it. Then I try using Secure Shell and that's beyond me.
Here's a few pictures to show the problems I'm having:
I also insert my rsa private key into the 'add ssh key' popup.
But then I get the problem seen above? I dont have a passphrase but if I hit enter I get an error:
ssh authentication failed: Access denied. Authentication that can continue: publickey
SSH Login failed.
Mosh has exited.
Press "x" to close the window.
Now I'm sure there's an easy way to do this but after working through a heap of how-to pages I still can't get anywhere.
Any help would be amazing.

The error is explaining the problem, it want's your public key, not your private key.
ssh authentication failed: Access denied. Authentication that can continue: publickey
You're only ever supposed to give your remote hosts your public RSA key.

So the problem was that I was using my private key generated through PuttyGen on Windows. I needed to export this in a linux format before I could use it. After that I just did what I recorded above and it worked.
If anyone is keen on learning how to do this and are beginners to the whole thing like me then I'm going to be putting a guide up on my website: finbarmaunsell.com

Related

Connecting to remote server with SSH keys

I have been trying to figure out where I am going wrong for a few days now.
I am trying to set up a pair of SSH keys, so my computer can remotely connect to my web server and run a script without a password.
I have generated the SSH keys on my Mac and placed the public key on the server in the '.ssh' folder, then added this to the 'authorized_keys' file.
When I run my command through terminal, I get the following, asking for both a passphrase and the password still.
Christophers-MacBook-Pro:~ christopherdavies$ bash /Users/christopherdavies/Desktop/rsync/chrisdavies/chrisdavies.sh
Enter passphrase for key '/Users/christopherdavies/.ssh/id_rsa':
chrisdavies#shell.host.co.uk's password:
Am I right to have placed the public key from my SSH keys pair on my Mac onto the server?
I am a bit lost here, so would really appreciate some advice. I am slowly learning, but feel I may be doing something blatantly obviously wrong...
It seems you are off to a good start. Some things to check:
make sure you stored the public key under .ssh/authorized_keys on the same user to which you intend to connect. In your case, it seems that your remote user is "chrisdavies", so it should be under ~chrisdavies/.ssh/autorized_keys.
make sure your script connects to the remote server as "chrisdavies". You might want to check that because you are under a different user on your MacBook "christopherdavies".
To troubleshoot, try to SSH to the remote server instead of running the script directly. If you run "ssh chrisdavies# and it works without the password, you do not have connectivity issues, and you'll need to look into your script.
I hope that helps!

I can't access my bitnami server using ppk

Can someone help me fix this issue. I am connected few hours before but then when I tried to rename a folder using Putty I got disconnected and got this error.
Error: Disconnected: No supported authentication methods available (server sent: publickey)
I've tried the following solutions I got from the net.
- Re-gen private key
- Convert .pem to .ppk
- Move .ppk to other folder that all user has permission
- Use the ff username user,root,bitnami,ec2-user
- I tried it in Cyberduck, Winscp, filezilla, Putty
Thank you I hope someone can help me.
bitnami developer here.
Depending on which platform you are working you could download again the .pem file in order to connect to your server.
If you are working on any of our launchpads (https://aws.bitnami.com/, https://google.bitnami.com/, etc.) you have the option
to download you .pem key, so it's not necessary to regenerate the key.
On the other hand, if you are working on the amazon ec2 console and you did not download the private key pair of your server in the moment of the creation of the machine you won't be able to connect to it again unless you create another machine.
In order to reconnect to the server you should download again the key files and use it with putty/filezilla/etc. Make sure you put the correct ip of the server or you won't have access to it.

Passworded ssh key suddenly does *not* require that I type the password

I use console2 in combination with git bash in order to interact with my local git repositories and by extension several github and bitbucket repositories also.
I use an ssh key pair to authenticate myself to these services, howevermy ssh key pair has an associated password.
This morning I found that I was no longer required to enter this password n my laptop in order to complete the authentication process.
I did some testing and it seems that the same key present on my desktop machine still requires me to enter my password.
So my question is.... why am I no longer required to enter my password on my laptop in order to authenticate with these servers?
Sounds like you have ssh-agent (sshagent.exe) running.
It is a small utility which allows you to enter your key's passphrase once and it then holds it "unlocked" for further use without you needing to re-enter the passphrase each time. Killing it will cause the original behaviour.
ssh-agent comes along with ssh in a standard msysgit installation. I'm not sure if something's changed that now means it's used by default or not though. Another explanation as to why it's running might be if you've installed posh-git and ran a Powershell session. By default (I believe - it's been a while), it'll run at the start of the session and ask for your key's passphrase. I use it every single day with this configuration as my passphrase is quite long... :-)
Something to do with having git-credential-winstore installed on your laptop?

How to connect to AWS EC2 instance using filezillla?

I have AWS EC2 instance. I am using filezilla 3.8.0 but I cannot connect instance, filezilla doesnt accept account type normal and asking password. When I type user name ubunbu and password blank I received following message:
Disconnected: No supported authentication methods available (server sent: publickey)
I inserted pem key and converted ppk key also. My staff can connect but I cant. What is wrong?
Thanks
It happens in AWS EC2. As EC2 provide Connection through an SFTP need some other methods.
Firstly the CONNECTION will be in FTP as default. Need to change to SFTP.
Then instead of directly giving host name and password, it must be done in Site manager. Step by step procedure given below:
So the steps for troubleshooting:
Go to Filezilla's Settings
SFTP
Add Key File (Give the ppk converted key file or FZ will convert the pem ket)
Then take File in Filezilla
Go to
File
Site Manager
New Site
Give any name (ec2-amazon)
In General, give host name 'Public DNS' (eg: ec2-34-423.ap-southeast...)
Change the Protocol to SFTP
Logon Type: Normal
User : ec2-user or ubuntu - depends
Clear Password
Connect!
Hope you will be connected. Happy Hosting...:)
More specifically here's a screenshot of the dialog where you are supposed to add your ssh private key.
Try the following configuration in filezilla,
set Logon type = Interactive,Protocal = SFTP, and attach keyfile to filezilla SFTP setting from MenuBar -> Edit -> Settings ->SFTP -> Add Key File.
Hope this helps.
I was facing the same problem-
I follow up #Amith Ajith answer but found my setting was as it, is.
I choose a file as privatekey.pem which i generated.
Change "Transfer setting" as active
it worked for me.

Unable to connect to amazon server using putty

I am trying to connect to EC2 server using putty with the help of .pem. It is giving me an error:
Disconnected: No supported authentication methods available (server sent: public key)
I have created a .ppk through puttygen. Still facing the same problem.
Can any one help me with the solution.
This usually means that there was a problem with how the pem file was converted to a ppk file, or that the pem file was not the right one to begin with. Make sure you followed the instructions for using puttygen correctly. There is an example here: Convert PEM to PPK file format
Alternatively, use a windows ssh client that uses pem files directly. Two options are:
Cygwin - it includes an ssh command line client.
Poderosa
U need a private key to connect to the server, the key U have probably is a public key, so U need to generate a private key in puttygen.
Perhaps, you use Ubuntu AMI. Should be user name - ubuntu.
Link: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/TroubleshootingInstancesConnecting.html#TroubleshootingInstancesConnectingPuTTY
For those searching, I had this issue but the latest authentication method was not supported by the old version of Putty. Upgrading Putty allowed me to connect.
I downloaded the latest Putty from the official website of Putty; then it required to uninstall, so I backed up by finding the key in the registry for:
HKEY_CURRENT_USER > Software > SimonTatham
By clicking on that entry and choosing File > Export and saved to desktop, this contains all the data and settings for Putty should something go wrong during uninstall.
Now with Putty backed up, you can uninstall Putty (CCleaner is a good option), and when it asks if you want to remove the sessions click NO, otherwise it will wipe the data, but fortunately you have the data backed up to the registry by this point.
Finally, now you can install the latest version of Putty. The latest version of Putty has the necessary authentication methods that AWS uses.

Resources