[Sciserver-users] ssh access to sciserver
Johannes Buchner
jbuchner at mpe.mpg.de
Thu Apr 3 15:40:57 CEST 2025
Hi all,
I am resending the email below for new users in case it is helpful.
Cheers,
Johannes
On 08.08.22 09:10, Johannes Buchner wrote:
> Hi all,
>
> I managed to get quite productive on sciserver by setting it up so that
> I can ssh from my laptop, also from outside MPE. This is based on the
> getting started info, but goes a little further, so I am sharing it here
> in case it is useful.
>
> ssh tunnel localhost <-> login1 <-> sciserver
>
> 1. create compute container, and open a terminal there
> - create the file "~/.ssh/authorized_keys" with your laptop's ssh
> public keys
> - limit the permissions (required!)
> - chmod 600 ~/.ssh/authorized_keys
> - open a reverse tunnel to login1
> - ssh -R PORTNUMBERHERE:localhost:22 jbuchner at login1.mpe.mpg.de -N
> - replace PORTNUMBERHERE with a port number between 10000 and 60000
> - this waits at login1 for connections to PORTNUMBERHERE which are
> forwarded to the sciserver ssh
> - the command should not show anything and keep running
>
> 2. on your laptop, create a forward ssh tunnel to login1
> - ssh -L PORTNUMBERHERE:localhost:PORTNUMBERHERE
> jbuchner at login1.mpe.mpg.de -N
> - this forwards connections on localhost:PORTNUMBERHERE to login1.
> - the command should not show anything and keep running
>
> 3. you can now connect. The username on sciserver is idies
> - ssh -p PORTNUMBERHERE idies at localhost
>
> Mounting ssh folders also works (sshfs, in gnome/nautilus enter sshfs://
> idies at localhost:PORTNUMBERHERE, etc)
>
> Adding a entry in ~/.ssh/config allows skipping step 2:
>
> Host myshortcutname
> Hostname localhost
> User idies
> Port PORTNUMBERHERE
> ProxyJump jbuchner at login1.mpe.mpg.de
>
> Then "ssh myshortcutname" will get you there.
>
> Cheers,
> Johannes
>
--
Dr. Johannes Buchner
Postdoctoral Researcher
Max Planck Institute for Extraterrestrial Physics
Garching, Germany
Fellow of the ORIGINS excellence cluster Data Science lab
http://astrost.at/istics/
MPE is committed to creating a safe and professional work environment
free of all forms of discrimination and harassment, where diversity and
inclusion are valued and where everyone is entitled to be treated with
courtesy and respect. Consequently, MPE will not tolerate any form of
harassment on any of its premises.
https://www.mpe.mpg.de/6563476/conduct
https://www.mpg.de/14172230/code-of-conduct.pdf
More information about the Sciserver-users
mailing list