Last week I set up a LEMP stack for a new customer, and there’s something new (kind of) and fun that I want to share:
It’s a new customer, I’ve exchanged with him before that by phone and by email, but no fancy things like IM (skype, gtalk/hangout, lync) nor complicated VPN between us.
My job was to setup a VPS, install a LEMP stack and help him to deploy his web application.
As we will have an intensive debugging session and exchange some sensitive data – like passwords – it’s unpratical to do this by email or phone and I’m not really going to use webex for that.
Instead, we’ve used the plain old terminal for this, it’s easy to setup, being quit pratical and we’ve many fun with that.
The setup is very simple: first of all, the customer send me his public key generated by putty and I verify by phone that key.
Then I fire up a new VPS, install ubuntu server, install some software including openssh-server and tmux, then create an user
jimy for him then put his public key in /home/jimy/.ssh/authorized_keys.
The fun part
I ssh into the server and launch the chat session like this:
ssh -AC me@vps_server sudo su - jimy -c "tmux"
Once inside the terminal, I do this:
cat >> ~/chat.log << EOF
Then I tell him to putty to the server, and do this:
We’re sharing now the same terminal, one can see – in real time – what the other one type, can scroll, can copy and paste any text, and the whole session is logged into a file – with only putty or ssh, no needs for skype, hangout and co., simply.
Cherry on the cake, I can
ctrl+b create a new seesion, switching to
ctrl+b next one or
ctrl+b previous one, to show him some more complicated tasks like creating/attaching a docker container or doing some basic backup with mysql_dump|gzip …
We can even close the terminal window at some point, go out to have lunch and back to the previous state with simply a
tmux attach later …
« La simplicité est la sophistication suprême. » -- Léonard de Vinci