Tag Archives: cli

ssh Through Two Hosts in One Command

Say you want a shell on a box but you have to hop through another box to get it. force@harold:~% ssh admin@maude maude:~ force$ ssh root@whee root@whee:~$ echo w00t w00t You can do that in one line using -t (pseudo-tty … Continue reading

Posted in quickies | Tagged , , , , , | Leave a comment

Delete a Line from a File by Its Line Number

I keep having this problem. You know how ssh will tell you when the host’s keys have changed? For example, you try to ssh to example.org $ ssh example.org and you get @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! … Continue reading

Posted in fixes | Tagged , , , , , | 2 Comments

Vim up your Bash

Are you a CLI ninja? I write a lot of single-use, throwaway scripts in Bash. Usually, it’s an iterative process. But editing a long one-liner in Bash can be cumbersome if you’re also a Vim or Emacs ninja. So here’s … Continue reading

Posted in CLI | Tagged , , , , , | Leave a comment