16

I want to ssh into my Cloud9 workspace. I have set the default "ubuntu" user's password using sudo passwd ubuntu, although this gets reset every time I reload the IDE. I found the workspace's IP using curl ipecho.net/plain and then scanned it with nmap and found that port 22 is open. It is hosted by Google Cloud, and changes whenever I reload the IDE. When I try to connect over ssh, my connection times out. The ssh terminal in Cloud9 is connected to a treasure data website over https. When I scan the treasure IP, ssh is not open. I think it is being tunneled or something. Doing sudo lsof -i, I learned that the workspace is running dropbear on port 58777 on some local IP, but I don't think this affects ssh'ing from the outside.

So there is the Google Cloud IP with ssh open, but to which I cannot ssh, the treasure data IP which is probably tunneled, and a few Cloud9 local IPs which I can't connect to anyway. How can I ssh into my Cloud9 workspace?

5
  • c9.io/support
    – ceejayoz
    Dec 29, 2014 at 18:40
  • 1
    Cloud 9 talks a lot about how you can ssh from the cloud 9 ide into your own server, but not how you can do the reverse, which is what I am interested in. I'm not sure if it is officially supported yet.
    – hacatu
    Dec 29, 2014 at 18:43
  • I linked you to their support. Ask them.
    – ceejayoz
    Dec 29, 2014 at 18:44
  • I am also interested in this, have you found a solution?
    – drahcir
    Apr 21, 2015 at 23:59
  • This is possible on the new AWS Cloud 9 since is uses AWS EC2 instances for the workspace. Within Cloud 9 you have full root access to an EC2 linux server which you can configure to allow outside ssh access.
    – Tom Aranda
    May 18, 2018 at 17:53

1 Answer 1

9

The network traffic can be simply redirected using tunnelling, however cloud9 sshd does not allow to log in using password, and the ~/.ssh/authorized_keys file is protected.

You can bypass this, by setting up your own dropbear on cloud9. I have done it like this:

wget https://matt.ucc.asn.au/dropbear/dropbear-2015.67.tar.bz2
tar xjf dropbear-2015.67.tar.bz2
cd dropbear-2015.67
./configure --prefix /home/ubuntu/workspace

added the following line:

#define DEBUG_HACKCRYPT "hL8nrFDt0aJ3E" /* this is crypt("password") */

to options.h, then:

make
make install

Then I have run dropbear on port 2222:

cd /home/ubuntu/workspace
bin/dropbearkey -t rsa -f dropbear_rsa_host_key
sbin/dropbear -E -F -p 2222 -r dropbear_rsa_host_key

On another cloud9 terminal I have tunelled the port 2222 to some.server:

ssh [email protected] -R 2222:localhost:2222

After doing this I was able to login from some.server:

ssh -p 2222 ubuntu@localhost

using password "password".

2
  • 1
    What is some.server? Why is C9 connecting to it?
    – user274720
    Jun 30, 2015 at 2:59
  • 1
    some.server is a computer with ssh that is accessible from internet, and we have an account on it
    – mik
    Aug 28, 2015 at 12:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .