Kirch's Stupid ~ Tricks

Connect to screen without a login shell

       ssh -t screen -r

The magic here is provided by the `-t` flag, this tells ssh to force a pseudo-tty session, and run the command (here, `screen -r`) without starting a shell. If you have OpenSSH 7.6 you can update your `.ssh/config` file to do this automatically with these lines

       Host tt
         ServerAliveInterval 30
         RequestTTY force
         RemoteCommand screen -r
now you can connect directly to screen with `ssh tt`

Tunnel through an HTTPS connection

          ssh -tt <server with HTTPS proxy> -p 443 ssh -tt tildetown screen -RRD

This combines the trick above with another - basic ssh tunneling.

If you have an account on or, each offers an https proxy -'s is located at

Ssh in from anywhere you connect to github from

      curl<your user name>.keys >> ~/.ssh/authorized_keys

Github stores a copy of all the SSH keys you have authorized with it, this makes it easy to add yourself (or others) to servers and anything else requiring a key.

Remove duplicate ssh keys (without making temporary files)

      vim ~/.ssh/authorized_keys +":sort u|wq"

This tells vim to open a file and run a few commands, in this case `:sort u` to uniquely sort the file, and `wq` to write and quit vim. The `|` tells vim that these are two separate commands (like `;` in most programming languages)