[Sciserver-users] ssh access to sciserver

aws aws at mpe.mpg.de
Mon Aug 8 11:58:36 CEST 2022


hi Johannes,
interesting but why is it better than the web interface which also is 
reachable from anywhere and has normal terminal interface for those like 
me who prefer that.
Andy

On 2022-08-08 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@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/



More information about the Sciserver-users mailing list