Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
projects:ssh_reverse_tunnel [2016/06/09 13:41] over23 [ALIVE] Reverse SSH Tunnel - link to key change on Picka |
projects:ssh_reverse_tunnel [2016/06/10 00:29] (current) over23 |
||
---|---|---|---|
Line 58: | Line 58: | ||
<code> | <code> | ||
- | #!/bin/bash | + | #!/bin/bash -x |
createTunnel() { | createTunnel() { | ||
##### fill in vars | ##### fill in vars | ||
- | RemoteHost="INSERT.IP.HERE.NOW" | + | RemoteHost="IP_HERE" |
- | ServerUser="NAME_FOR_REMOTE_USER" | + | ServerUser="NICK_HERE" |
##### are wars filled? | ##### are wars filled? | ||
- | | + | |
- | /usr/bin/ssh -N -R 2222:localhost:22 ${ServerUser}@${RemoteHost} | + | /usr/bin/ssh -N -R 2222:localhost:22 ${ServerUser}@${RemoteHost} & |
if [[ $? -eq 0 ]]; then | if [[ $? -eq 0 ]]; then | ||
echo Tunnel to RemoteHost IP: ${RemoteHost} created successfully | echo Tunnel to RemoteHost IP: ${RemoteHost} created successfully | ||
Line 92: | Line 92: | ||
- | + | ==== Note for MAC users ==== | |
+ | * in case you have problem, that wiifi is turned off when screensaver is on | ||
+ | * remember en1 should be replaced by your wiifi interface | ||
+ | <code> | ||
+ | cd /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources | ||
+ | sudo ./airport en1 prefs DisconnectOnLogout=NO | ||
+ | </code> |