Documentation

VM consoles without copy and paste

For VM consoles (vSphere, Proxmox, iLO, iDRAC), fresh servers and rescue systems: machines where you can type, but copy and paste doesn't reach, and where you can't install a client. All you need there is curl.

Any machine with curl
$ curl clipline.roedlach.tirol/s/aB3-x9Z Clipline session aB3-x9Z, 12 min left # TYPE AGE ENTRY 1 file 6m deploy-notes.pdf (48 KB) 2 text 2m ssh [email protected] $ curl clipline.roedlach.tirol/s/aB3-x9Z/last ssh [email protected] $ ip a | curl -T - clipline.roedlach.tirol/s/aB3-x9Z Saved as entry 3 of session aB3-x9Z.
Nothing to install: any machine with curl reads a session and sends output back to it.

The idea

You start a session in the browser. It has a short code, for example aB3-x9Z, and one short address:

https://clipline.roedlach.tirol/s/aB3-x9Z

On the console you type that address with curl. Everything you put into the session in the browser can be fetched there, and anything you send from the console shows up in the browser right away – where you can copy it as usual.

1. Start a session

On the clipboard click the dark Terminal session button at the top right, next to the page title. The session page opens. Its box In a terminal lists every command with the real address.

Click the eye icon next to a command to see it large in the middle of the browser window. Characters that look alike, like 0 and O or 1, l and I, are labelled, and spaces are shown as ␣. Put the console next to the browser and type it off the screen.

2. Get something onto the console

Add it in the browser: paste text into the box, or drop a file anywhere on the page. Every entry of a session gets a number – the dark square in front of it – and keeps it.

curl https://clipline.roedlach.tirol/s/aB3-x9Z            # what is in the session, with numbers
curl https://clipline.roedlach.tirol/s/aB3-x9Z/last       # print the newest entry – usually what you want
curl https://clipline.roedlach.tirol/s/aB3-x9Z/2          # print entry 2
curl -fOJ https://clipline.roedlach.tirol/s/aB3-x9Z/1     # save entry 1, a file, under its name

Typical uses:

curl https://clipline.roedlach.tirol/s/aB3-x9Z/2 > /etc/nginx/sites-available/app.conf   # a config file
curl https://clipline.roedlach.tirol/s/aB3-x9Z/2 | sh                                    # a script (check it first)

3. Get something back from the console

ip a | curl -T - https://clipline.roedlach.tirol/s/aB3-x9Z                 # the output of a command
echo "10.0.4.12" | curl -T - https://clipline.roedlach.tirol/s/aB3-x9Z     # a line of text
curl -T /var/log/syslog https://clipline.roedlach.tirol/s/aB3-x9Z/         # a file – keep the / at the end

Each command answers with the number it got, e.g. Saved as entry 3 of session aB3-x9Z. In the browser the entry appears within a few seconds, with a Copy or Download button.

Everyone who knows the code can read the session, and it ends after 15 minutes. Don't send secrets into a session you share with others, and start a new session for the next job.

Tips

  • curl https://clipline.roedlach.tirol/s/aB3-x9Z on its own always tells you what's there and how to get it – also when the session is empty.
  • The numbers don't change: entry 2 stays entry 2, even after more entries arrive.
  • If the console has no curl but wget: wget -qO- https://clipline.roedlach.tirol/s/aB3-x9Z/2 prints an entry.
  • https:// matters: without it, curl doesn't follow the redirect to the secure address.
  • The same address opens the session in a browser, so it is also the link you send to a colleague.
  • Done? End session on the session page (or the × on its pill) deletes the session and everything in it right away.