6

I am trying to connect to my ec2 instance from my chromebook using the secure shell extension but I keep getting the following error:

Loading NaCl plugin... done. ssh: connect to host (public DNS) port 22: Connection refused NaCl plugin exited with status code 255.

I have been following the steps on this site but with 0 success. http://www.mattburns.co.uk/blog/2012/11/15/connecting-to-ec2-from-chromes-secure-shell-using-only-a-pem-file/

Help please.

Mdude
  • 93
  • 1
  • 7
  • Your ec2 server is not accepting ssh connection. Are you sure port 22 is open to accept connection from your chromebook IP? Can you check the security group of your ec2 server? – helloV Nov 03 '15 at 19:36
  • yes I have opened port 22 to my chromebooks IP. I think i see the problem. It is a windows server I am trying to log into. It is not possible to ssh into a windows server is it? – Mdude Nov 04 '15 at 01:44

1 Answers1

8

If you're doing this on your chromebook, you should have developer mode enabled so that you can enter the console and execute Linux commands. Once developer mode is enabled, enter the console with ctrl+alt+t and then type in shell.

First you'll want to change the permissions of your .pem key. The ssh keygen won't run if the permissions aren't restricted enough.

sudo chmod 400 myKeyPair.pem

Next you'll want to generate your own public key with ssh-keygen like mentioned in the other links.

ssh-keygen -y -f myKeyPair.pem > myKeyPair.pub

After this, you'll want to create a file with no extension and the private key pair inside.

touch myKeyPair

After this, copy the contents of the .pem file to the file with no extension, myKeyPair.

sudo cat myKeyPair.pem > myKeyPair

Next you'll want to open up the secure shell extension, which can be found here.

Enter your connection information for your machine and don't forget to specify the port number. When it comes to importing the key pair, select both the myKeyPair.pub and the myKeyPair files using ctrl.

That's it, you should be connected!

Scott123180
  • 91
  • 1
  • 11
  • Is it necessary to set permissions on the myKeyPair file? Also people need to be aware of the security group setttings in AWS/EC2, if you previously restricted SSH logins to a specific IP address (recommended!) be sure to update that if you are logging in from another IP. Still can't get this to work but it's something else, gonna launch my Ubuntu install on the Chromebook and use a more familiar environment :) – JimLohse May 22 '19 at 14:54