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

#!/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

IP Multicast Routing Concepts

IP Multicast Routing Concepts

Can you imagine a video conference taking place on a primarily T1 based WAN? Multiple copies of the same video stream being unicast from the host to each participant. Multiple …

Read More
QinQ: IEEE 802.1Q Tunneling

QinQ: IEEE 802.1Q Tunneling

In situations where service providers want to offer transparent LAN services that preserve a customers VLAN tags across your Layer-2 network, this amendment to the IEEE 802.1q …

Read More
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 …

Read More