On Work Machine:
ec2-authorize --region us-east-1 -p 20000 gateway
# create security group and authorized ports
# this assumes that you have an amazon ec2 account and
# ami-tools and api-tools setup.
# ami-tools and api-tools setup.
# setting all that up is straightforward, but outside the scope of this post
ec2-add-group --region us-east-1 gateway -d gateway
ec2-authorize --region us-east-1 -p 22 gateway
# create your gateway machine.
# your ami may differ. ubuntu likes to update its amis very often.
# also your keypair may have a different name, adjust accordingly
ec2-run-instances ami-ee857587 --instance-type m1.small --region us-east-1 -k gsg-keypair-east -g gateway
# note the public url of the newly created machine
# also optionally setup an easier DNS name such as gateway.adku.com
On Gateway Machine:
sudo echo "GatewayPorts yes" >> /etc/ssh/sshd_config
sudo /etc/init.d/ssh reload
On Work Machine:
# 20000 is an arbitrary port, you can choose any open port.
# you just have to remember it for later.
# 20000 is an arbitrary port, you can choose any open port.
# you just have to remember it for later.
# gateway.adku.com should also be replaced with your public dns name
ssh -nNT -R gateway.adku.com:20000: localhost:22 gateway.adku.com
And you're done!
Now you can get to your work machine from anywhere like this:
On Any Machine:
# 20000 is the port from earlier, make sure it matches
ssh -p 20000 jesse@gateway.adku.com
Jesse,
ReplyDeleteHere's a quick tip. When Carlos says he's "working remotely", he's either
A) Gambling remotely
B) Drinking remotely
C) Carousing remotely
D) All of the above
I've seen Carlos code while drinking actually. It's very impressive.
ReplyDeleteI've seen Carlos do all of the above, simultaneously. Also impressive.
ReplyDeleteI've seen Carlos do all this and blast mp3s remotely for the benefit of whoever happens to be sitting in the vicinity of his workstation.
ReplyDeletecarlos can code?
ReplyDeleteI think when Carlos says he's working remotely, he's not doing anything remotely related to work ;)
ReplyDeleteon a more serious note i am purchasing laptops for my 3 developers and am wondering what the spec machines i should be looking at. Are 3 $2500 macbook pro's with 8gb ram too much? The laptops will remain company assets, but for the duration of their work they'll be theirs. I foresee having an iphone/android app in the not so distant future hopefully they can start making it after the product is delivered. Otherwise i could just get 3 sub $1000 laptops with about the same specs as the apple. Seed funding could last a year or six months depending on speed of product delivery and user acceptance. So my main concern is saving the cash for the real expenses i foresee being hosting and product delivery. Minor expenses being different technologies and SAAS we employ, which all seem to be subscription based. So I'm not ready to get imacs for everyone we don't have an office yet we're still the garage team, but we have 500k of seed funding. So i'm not strapped...or am I?
ReplyDeleteRunning your AMIs in us-west-1 will make round trip times a lot more tolerable, assuming "remotely" means Vegas.
ReplyDelete