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

Network Design — Keeping it simple

Network Design — Keeping it simple

Since the dawn of time people have skirted best practice and banged together networks, putting the proverbial square peg in the esoteric round hole. For example, new vendor XYZ’s …

Read More
Cisco Systems Awesomesauce aka Full Tilt Boogie

Cisco Systems Awesomesauce aka Full Tilt Boogie

First of all, I want to say thank you to everyone from Cisco Systems for inviting us into the CCIC (Cisco Cloud Innovation Center), this was an amazing room to hold our …

Read More
Working with the Embedded Event Manager (EEM)

Working with the Embedded Event Manager (EEM)

Cisco IOS has plenty of gems contained within, but few are as fun, and as endlessly useful as the Embedded Event Manager, or EEM. To define it simply, EEM is a technology that …

Read More