Wednesday, June 15, 2011

Working Remotely

At Adku, every engineer we hire gets a quad-core iMac with a 12GB memory upgrade and a 15-inch quad-core MacBook Pro with maximum memory upgrades (8GB).  When we're working remotely on our laptops, sometimes we'll realize that we forgot to check-in a piece of code that is sitting on our iMac at work.  If we could ssh into the iMac, we'd be able to check it in and continue where we left off.  The problem is our office is behind multiple NATs which make it hard to set up port forwarding and as a fast moving startup, it's not worth the time to set up our own name server.  We needed something quick and easy.  What we ended up doing was setting up SSH tunnels from our machines at work to an Amazon EC2 instance we call  With the tunnel set up, accessing our machines at work is as simple as SSH'ing to the right port on  Here is how to set one up for yourself.

    On Work Machine:
    # create security group and authorized ports
    # this assumes that you have an amazon ec2 account and 
    # 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

    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.
    # should also be replaced with your public dns name
    ec2-authorize --region us-east-1 -p 20000 gateway
    ssh -nNT -R

    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


    1. Jesse,

      Here'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

    2. I've seen Carlos code while drinking actually. It's very impressive.

    3. I've seen Carlos do all of the above, simultaneously. Also impressive.

    4. I'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.

    5. I think when Carlos says he's working remotely, he's not doing anything remotely related to work ;)

    6. on 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?

    7. Running your AMIs in us-west-1 will make round trip times a lot more tolerable, assuming "remotely" means Vegas.

    8. It is great to have visited your website. Thanks for sharing useful information. And also visit my website about health. God willing it will be useful too

      Obat Telinga Bernanah paling Ampuh
      Cara Memesan QnC Jelly Gamat
      Cara Mengobati kista Bartholin tanpa Operasi
      Biaya dan Efek Samping Operasi Kista Bartholin
      Obat ISPA paling Ampuh

    9. The post is written in very a good manner and it contains many useful information for me. Thank you very useful information admin, and pardon me permission to share articles here may help :

      risa herbal
      cara menghilangkan benjolan
      toko obat herbal sapnudin
      sehat dan cantik alami
      khasiat obat herbal
      cara menghilangkan bekas jerawat

    10. I can only express a word of thanks. Because with the content on this blog I can add knowledge I, thank has been sharing this information. Do not forget to visit our website to share information and knowledge about health. |
      cara mengobati bibir kering dan pecah |
      agen pusat walatra kapsul |
      obat busung air ascites |
      cara mengatasi penyakit epilepsi

    11. It's great, wish you success in the next blog, this is a post that we all should read at least once. I would love to keep track of your posts, it is really a useful source of information, wish you success.
      Jogos live, cá koi mini, friv4school girl games, friv Games 2019

    12. This comment has been removed by the author.

    13. Bed bugs and problems caused within days will be eliminated and also will be the protection of the house can not return to the apartments or bedrooms.
      شركة مكافحة حشرات بسكاكا
      شركة رش مبيدات بسكاكا
      المبيدات الحشرية الكيميائية
      افضل شركة مكافحة حشرات

    14. Finding psychology case study writing services online is very easy as there many highly qualified professional psychology research paper service writers.

    15. Please continue this great work and I look forward to more of your awesome blog posts. Discover the most popular people ranked on Celebrity birthdays .

    16. Intellecto Automation

      Intellecto Automation Service is the leading authority on smart homes technology, with countless home automation kits to suit our customers’ needs for the office or the residence.

      home automation in chennai
      interior designers in chennai
      home security systems in chennai
      home theatres in chennai
      lighting automation in chennai
      modular kitchen in Chennai
      office automation in chennai
      cctv camera installation in chennai

    17. Thanks for sharing such an Amazing information, I Couldn't leave without reading your blog. I have read another good blog, I think you have read it too. click here Lexmark Printer nummer

    18. The information you are providing that is really good. Thank for making and spending your precious time for this useful information. Thanks again and keep it up. Top CA firm in India

    19. This article will outline all the different strategies you should be aware of when it comes to soccer.

      Top IAS Coaching in Mumbai

    20. Really Nice Post Admin, Very helpful looking for more posts, Now I have to share some information about How To Fix “Google Troubleshooting Guide” problem. If you are going through this problem you can simply Contact google bellen Nederland

    21. Thanks for sharing this usefull topic. i hope it is improtant post for everybody. thanks and have a good day
      QuickBooks is effective, affordable and usable, particularly considering the requirements of small businesses today. TheQuickbooks Online Error Code 101 is one of the commom Quickbooks banking error. Generally, this message occurs during the import of bank account transactions into Quickbooks online. In this blog, you can know the reasons, signs, and ways to fix this Quickbooks online error code 101.

    22. Your work is very good and I appreciate you and hopping for some more informative posts
      business analytics course

    23. Fantastic article I ought to say and thanks to the info. Instruction is absolutely a sticky topic. But remains one of the top issues of the time. I love your article and look forward to more.
      Data Science Course in Bangalore

    24. Thank you quite much for discussing this type of helpful informative article. Will certainly stored and reevaluate your Website.
      Data Analytics Course in Bangalore

    25. Nice to be seeing your site once again, it's been weeks for me. This article which ive been waited for so long. I need this guide to complete my mission inside the school, and it's same issue together along with your essay. Thanks, pleasant share.
      Data Science training in Bangalore

    26. Very wonderful informative article. I appreciated looking at your article. Very wonderful reveal. I would like to twit this on my followers. Many thanks! .
      Data Analytics training in Bangalore

    27. It was good experience to read about dangerous punctuation. Informative for everyone looking on the subject.
      data scientist training in hyderabad

    28. These thoughts just blew my mind. I am glad you have posted this.
      data scientist training and placement

    29. Great tips and very easy to understand. This will definitely be very useful for me when I get a chance to start my blog.
      data scientist course

    30. Excellent post.I want to thank you for this informative read, I really appreciate sharing this great post.Keep up your work
      data scientist course in hyderabad

    31. Thanks for this blog. Working remotely is one of the best and convinient thing for all the employee. If you looking for Accounting job and want to know difference between Acca and Ca. Visit this Blog.

    32. I read your post. It is amazing and helpful information for me. Thanks for sharing with everyone.
      ATT is the world-famous web email company and it also offers the best deal with security for the users, it protects your data from unwanted people and viruses. If you are an ATT user, and, while using an ATT email account, you are troubled by ATT Email Login issues. You don't need to worry, in this case, you just need to dial our ATT customer care number and they will provide accurate solutions regarding your problems.

    33. Thank you quite much for discussing this type of helpful informative article. Will certainly stored and reevaluate your Website.
      Data Analytics Course in Bangalore

    34. It’s really nice and meaningful. It’s really cool blog. Thanks for sharing and please update some more information here. Have you been looking for the Zelle customer service support, than you have arrived at the right destination. At this destination you will find the customer service help from zelle, and if you found some issues in using zelle, then you can resolve them by just a click on the given link.

      Sharma Academy is Central Indias largest provider of Mppsc Notes and Mppsc Study Material.

    36. Stunning Post. Thanks for giving me this information.
      Are you looking for how to get coin master free spins? Now, you have the right place to get Free Spin And Coin. Coin Master Free Spins is one of the most popular games. Through this, you can get free spins and coins and rewards, enjoy it, spend your time and play Coin Master Game.

    37. Join our Online Data Science Course program to analyze data, make effective predictions and gain a better understanding of market trends. Create disruptive business models for the topmost industries as we equip you with a sound business analytical & entrepreneurial ideology, alongside an excellent grasp of marketing strategies and trends.

    38. Become a Data Science expert with Innomatics. we provide classroom training on Data Science course in Hyderabad for the individuals who believe hand-held training. We teach as per the Indian Standard Time (IST) with In-depth practical Knowledge on each topic in classroom training, 80 – 90 Hrs of Real-time practical training classes. There are different slots available on weekends or weekdays according to your choices.

    39. This comment has been removed by the author.

    40. Very nice post thanks for sharingThis post. Have you been searching for the Cash App Customer Service number if yes then it is the right place for you. Here you will get the 24/7 helpline number of the cash app and if you have any kind of issue in using the cash app, then they can also be resolved by a single click on this link.