Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Working Remotely (via SSH) Rocks!

Working Remotely (via SSH) Rocks!

Title: Working Remotely (via SSH) Rocks!
Intro: Consistent & Persistent development environment from any location any client.

"SSH + TMUX + CLI" Rocks!
Be "Command Line Interface"

Kent Chen

June 17, 2014
Tweet

More Decks by Kent Chen

Other Decks in Technology

Transcript

  1. Kent Chen (chenkaie) [email protected] http://chenkaie.blogspot.com @chenkaie on GitHub @chenkaie on

    SlideShare @chenkaie on LinkedIn @chenkaie on Twitter @+KentChenAtGoogle on Google+
  2. .

  3. ..

  4. ...

  5. Basic Requirement ! • 24-Hours online SSH server: • DD-WRT

    Router / VPC (Amazon EC2) / NAS / 
 A development board / … • With Public Access IP: • Fixed IP (Trivial) • Dynamic IP (DDNS) • SSH Client: • Mac OS X / Linux Distributions (Prefer Unix- based) • Windows (putty, plink) • Not too poor upload/download network bandwidth
  6. 至於打通手法 Goolge it, BJ4 Lots of tutorial, no explanation “Remote

    Port Forwarding” on 22 Ref: http://josephj.com/entry.php?id=312
  7. 我只能說: 建議搭配服用 “Autossh / expect” & “SSH Public Key Authentication”

    效果加乘 Employ with “autossh / expect” to get persistent connection
  8. Working remotely through Reverse SSH Tunnel Joker: You see dead

    people. Hey you, get the job done. Or…
  9. Me an embedded system developer daily using CLI utilities !

    • Editor: vim • VCS/SCM: git / svn • Diff/Merge: vimdiff / DirDiff (vim) • Terminal Multiplexer: tmux • File search: find / godir() • pattern matching: grep / aj / gid (ID Utils) Ref: Vim Rocks! http://www.slideshare.net/chenkaie/vim-rocks TMUX Rocks! http://www.slideshare.net/chenkaie/tmux-rocks
  10. 容易建置、部署 一致性開發環境 Consistency dev environment easily setup on different machines

    even different platforms Ref: https://github.com/chenkaie/manifest-unix-env-deploy
  11. 那就建立 SOCKS v4/v5 Proxy Server Use “ssh -D” to setup

    SOCKS Server Ref: http://josephj.com/entry.php?id=312
  12. Redmine Wiki Bugzilla WebMail Private IP Host Private IP Device

    Don’t worry, all are easily accessible
  13. RTSP streaming connection via CLI: avconv avconv (ffmpeg): $ avconv

    -rtsp_transport tcp -i "rtsp://[email protected]/live.sdp" -vcodec copy ~/tmp/test.mp4
  14. Test: You can test by below command to check if

    successfully forwarded? $ telnet <Domain> <port> ! Setup: Fill in the corresponding forwarded “Domain:Port” as right figure.
  15. Reference Remote Development http://crosbymichael.com/remote-development.html Why We (Still) Believe in Working

    Remotely http://blog.stackoverflow.com/2013/02/why-we-still-believe-in- working-remotely/ 37signals Works Remotely http://37signals.com/remote/ Coffitivity - Increase Your Creativity! http://www.coffitivity.com/
  16. Reference 反向建⽴立 SSH Tunnel、免 VPN 連回公司 http://josephj.com/entry.php?id=312 Mosh (mobile shell)

    http://mosh.mit.edu/ Vim Rocks! http://www.slideshare.net/chenkaie/vim-rocks TMUX Rocks! http://www.slideshare.net/chenkaie/tmux-rocks subversion-scripts (Throw away TortoiseSVN) https://github.com/chenkaie/Tools/tree/master/subversion-scripts