-
Notifications
You must be signed in to change notification settings - Fork 13
/
rcons
executable file
·59 lines (56 loc) · 1.65 KB
/
rcons
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/usr/bin/env bash
# rcons -- attach to a host's local console over network
. lib.bash || exit
case ${0##*/} in
*-console)
host=${0##*/}; host=${host%-console};;
*)
host=${1?missing hostname}; shift;;
esac
case $host in
ember|wind|dune)
rconsole $host;;
wolke)
#do: ssh -t lish-london.linode.com $host;;
echo "Order KVM: https://robot.hetzner.com/support/index?server_id=2141018";;
sky)
echo "Web VNC: https://cloud.hosthatch.com/servers/25904/console";;
star)
echo "Web VNC: https://klientams.iv.lt/server.php?id=658792";;
land)
echo "Web VNC: https://web7.php-friends.de/";;
river|vm-litnet)
# Expects /n/ember/.config/openstack/clouds.yml to be available.
do: env HOME=/n/ember OS_CLOUD=litnet \
openstack console url show -f shell 13d7ec56-18f1-4f13-a27f-d21e61c25dfb;;
ampere|vm-ampere)
test -e ~/.oci/config && ! test -e ~/.oci/sessions/DEFAULT/token ||
do: oci session refresh ||
do: oci session authenticate --region eu-frankfurt-1 --profile-name DEFAULT &&
do: oci-console fra-ampere-1;;
cisco-top)
echo "Use &# to break, &. to detach."
do: ssh -t alter "doas cu -E '&' -l /dev/ttyU0";;
cisco-mid)
echo "Use Ctrl-] 'send brk' to break."
do: telnet cisco-top 2005;;
cisco-btm)
echo "Use Ctrl-] 'send brk' to break."
do: telnet cisco-mid 2005;;
dust)
do: telnet dune 2501;;
alter)
do: telnet dune 2502;;
shore)
do: tapo 10.4.240.4 "$@"
vmsg "only power-cycle available for $host" >&2;;
uk-gw|gw-core)
do: gw-core-console;;
uk-lnx1)
echo "Using serial console via AP-M7-14."
do: ssh [email protected];;
uk-lnx2)
do: rconsole ${host/#uk-/bmc-}.utenos-kolegija.lt;;
*)
vdie "unknown host: $host";;
esac