Skip to content

Instantly share code, notes, and snippets.

@jfilter
Last active December 6, 2018 15:37
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jfilter/f6c05bf67e6936e30fdfbf953ed0b381 to your computer and use it in GitHub Desktop.
Save jfilter/f6c05bf67e6936e30fdfbf953ed0b381 to your computer and use it in GitHub Desktop.
Working with Idun and other HPI Servers

Working with Idun

For all, replace $PASSWORD with your password, and Johannes.Filter with your name.

0. SSH config

Host hpi
	hostname 141.89.225.148
  	user johannes.filter

Host idun
	hostname 172.20.11.11
	user $USER
	proxyjump hpi

1. Login to idun

#!/bin/bash

/usr/bin/expect <(cat << EOF
spawn ssh idun
expect "johannes.filter@141.89.225.148's password:"
send "$PASSWORD\r"
interact
EOF
)

2. Tunnel, choose XX, access on local machine localhost:8888

#!/usr/bin/expect -f

set timeout -1
spawn -ignore HUP ssh -N -f -L 8888:localhost:88XX idun
expect "johannes.filter@141.89.225.148's password:"
send "$PASSWORD\r"
interact
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment