SSH Wrapper Script

SSH Wrapper Script

Ok — this is my first script that I’m posting here. Its a VERY simple ssh wrapper script that you can place in your path, preferably in ~/bin

bash
#!/bin/bash
SSH="/usr/bin/ssh"
case "$*" in
 *'@'*)     $SSH $* ;;
 *' -l'*)     $SSH $* ;;
 *)         $SSH -l root $* ;;
 esac

What this allows us to do is ssh as root to another box w/o specifying a user. Very handy if you spend your life in a terminal as I do. This could also be easily modifed for use with SCP or anything you wish…

comments powered by Disqus

Related Posts

Double NAT – Cisco ASA 8.4+

Double NAT – Cisco ASA 8.4+

Recently I was faced with an issue outside my normal expertise… those of you that know me realize I am anything but a security engineer. But in reality, you must always expand your …

The complexity required for robustness, often goes against robustness

The complexity required for robustness, often goes against robustness

In the past few months we have seen major outages from United Airlines, the NYSE, and the Wall Street Journal. With almost 5,000 flights grounded, and NYSE halting trading the cost …

Networking Field Day 13 –  Sneak Preview

Networking Field Day 13 – Sneak Preview

This is going to be a busy week for the Tech Field Day family. They have delegates en-route to Tech Field Day 12 this morning, and Wednesday the crew for Network Field day 13 …