Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Sofiane Bendoukha
ssh_scripts
Commits
3a3bf822
Commit
3a3bf822
authored
Feb 28, 2019
by
Mathis Rosenhauer
Browse files
jupyter: support older versions of ssh
parent
437e3a3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
start-jupyter
View file @
3a3bf822
...
...
@@ -283,15 +283,22 @@ function open_tunnel () {
if
[[
-n
${
SJ_ACCTCODE
}
]]
;
then
# Tunnel to notebook in job needs jump host since nodes
# usually have no direct external access.
# Unfortunately, doesn' seem to support connection sharing
# for the jump host
ssh
-o
ForwardX11
=
no
\
-o
StrictHostKeyChecking
=
accept-new
\
-J
"
${
SJ_USERNAME
}
@
${
SJ_FRONTEND_HOST
}
"
\
-L
"
${
port
}
:localhost:
${
port
}
"
\
-Nf
\
"
${
SJ_USERNAME
}
@
${
node
}
"
# usually have no direct external access. Unfortunately, ssh
# doesn't seem to support connection sharing for the jump host
if
!
ssh
-o
ForwardX11
=
no
\
-o
StrictHostKeyChecking
=
accept-new
\
-J
"
${
SJ_USERNAME
}
@
${
SJ_FRONTEND_HOST
}
"
\
-L
"
${
port
}
:localhost:
${
port
}
"
\
-Nf
\
"
${
SJ_USERNAME
}
@
${
node
}
"
;
then
echo
"Please consider updating your local ssh client!"
ssh
-o
ForwardX11
=
no
\
-o
StrictHostKeyChecking
=
no
\
-o
ProxyCommand
=
"ssh
${
SJ_USERNAME
}
@
${
SJ_FRONTEND_HOST
}
nc
${
node
}
22"
\
-L
"
${
port
}
:localhost:
${
port
}
"
\
-Nf
\
"
${
SJ_USERNAME
}
@
${
node
}
"
fi
else
ssh_frontend
""
"-O forward -L
${
port
}
:localhost:
${
port
}
"
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment