From: Xavi Leon Date: Thu, 10 Nov 2011 17:08:31 +0000 (-0500) Subject: Custom shell to allow a user to connect to its sliver using the slice_name. X-Git-Tag: lxcbuild~3 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=adc04bc349fc16efea22c436f3b350f5ab937aad;p=nodemanager.git Custom shell to allow a user to connect to its sliver using the slice_name. --- 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 "$@"