From adc04bc349fc16efea22c436f3b350f5ab937aad Mon Sep 17 00:00:00 2001 From: Xavi Leon Date: Thu, 10 Nov 2011 12:08:31 -0500 Subject: [PATCH] Custom shell to allow a user to connect to its sliver using the slice_name. --- sshsh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 sshsh diff --git a/sshsh b/sshsh new file mode 100755 index 0000000..edcd667 --- /dev/null +++ b/sshsh @@ -0,0 +1,5 @@ +#!/bin/bash +MAC=$(virsh --connect lxc:// --readonly dumpxml $USER|grep mac|awk -F\' '{print $2}') +IP=$(cat /var/lib/libvirt/dnsmasq/default.leases | grep $MAC | awk '{print $3}') +shift +ssh root@$IP "$@" -- 2.47.0