diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2018-08-07 11:10:05 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2018-08-07 11:10:05 +0000 |
commit | 70943e01d971fd86c1daceb3787bfa9c13a65975 (patch) | |
tree | 9b1cc54a39c1e4501c0304c7dd95a36541607906 | |
parent | 7d3a92308f0d99e1356bc97a1d1c5e546b069b99 (diff) |
tcwg-base: Add ability to ssh to *.tcwglab machines via ci.linaro.org
Add ssh-tcwglab-nc.sh script to avoid the overhead of ssh'ing through
Germany-based ci.linaro.org when both machines are inside Cambridge Lab.
Change-Id: I1434f3215344e7aa2adbc99eb14a6592009ce8fa
4 files changed, 18 insertions, 0 deletions
diff --git a/tcwg-base/home-data/maxim.kuvyrkov/.ssh/ssh-tcwglab-nc.sh b/tcwg-base/home-data/maxim.kuvyrkov/.ssh/ssh-tcwglab-nc.sh new file mode 120000 index 00000000..6eddeb50 --- /dev/null +++ b/tcwg-base/home-data/maxim.kuvyrkov/.ssh/ssh-tcwglab-nc.sh @@ -0,0 +1 @@ +../../tcwg-buildslave/.ssh/ssh-tcwglab-nc.sh
\ No newline at end of file diff --git a/tcwg-base/home-data/tcwg-benchmark/.ssh/ssh-tcwglab-nc.sh b/tcwg-base/home-data/tcwg-benchmark/.ssh/ssh-tcwglab-nc.sh new file mode 120000 index 00000000..6eddeb50 --- /dev/null +++ b/tcwg-base/home-data/tcwg-benchmark/.ssh/ssh-tcwglab-nc.sh @@ -0,0 +1 @@ +../../tcwg-buildslave/.ssh/ssh-tcwglab-nc.sh
\ No newline at end of file diff --git a/tcwg-base/home-data/tcwg-buildslave/.ssh/config b/tcwg-base/home-data/tcwg-buildslave/.ssh/config index 1b8fb405..140ad7e0 100644 --- a/tcwg-base/home-data/tcwg-buildslave/.ssh/config +++ b/tcwg-base/home-data/tcwg-buildslave/.ssh/config @@ -16,6 +16,10 @@ Host *.tcwglab *.aus-colo people.linaro.org aus-colo.linaro.org lab.validation.l Host *proxy.* ProxyCommand ssh $(echo %h | sed -e "s/proxy\.//") nc -q0 localhost %p +# Access to Cambridge Lab. E.g., ssh dev-01.tcwglab +Host *.tcwglab + ProxyCommand ssh-tcwglab-nc.sh -q0 %h %p + # Access to Austin Colo. E.g., "ssh r1-a7.aus-colo" Host *.aus-colo ProxyCommand ssh aus-colo.linaro.org nc -q0 %h %p @@ -50,6 +54,9 @@ Host *.tcwglab *.aus-colo *.lab tcwg-d05-01 libgomp-d05 tcwg-thx1-01 # Don't warn about "adding" host keys to /dev/null LogLevel FATAL +Host ci.linaro.org + Port 2020 + Host git.linaro.org dev-private-git.linaro.org User git diff --git a/tcwg-base/home-data/tcwg-buildslave/.ssh/ssh-tcwglab-nc.sh b/tcwg-base/home-data/tcwg-buildslave/.ssh/ssh-tcwglab-nc.sh new file mode 100755 index 00000000..24038b50 --- /dev/null +++ b/tcwg-base/home-data/tcwg-buildslave/.ssh/ssh-tcwglab-nc.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +if ip addr show 2>&1 | grep -q "inet 192\.168\.1[678]\."; then + # If we are in one of TCWG Cambridge subnetworks, then use straight nc. + exec nc "$@" +else + # Otherwise jump from ci.linaro.org + exec ssh -Snone ci.linaro.org nc "$@" +fi |