Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document some SSH tricks #17

Open
lesteve opened this issue Mar 10, 2020 · 3 comments
Open

Document some SSH tricks #17

lesteve opened this issue Mar 10, 2020 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@lesteve
Copy link
Member

lesteve commented Mar 10, 2020

In my experience this is often one of the blocker because when you don't know them, it is super hard to find them by googling. It'd be good to have quick examples and point to some good reference doc for more details.

~/.ssh/config tricks with ProxyCommand

Generally you need two ProxyCommand (working from home going through your institute SSH gateway and then your authorised machine before reaching Jean Zay) but we chould start with one ProxyCommand (for example you are working from one machine that is not the authorised machine but can reach the authorised machine with ssh) to be easier to understand

Host institute-ssh-gateway
hostname ssh.gateway.your-institute.fr

Host your-authorised-machine
hostname your-authorised-machine.your-institute.fr
ProxyCommand ssh -W %h:%p institute-ssh-gateway

Host jean-zay
ProxyCommand ssh -W %h:%p your-authorised-machine
user your-jean-zay-login

Access IDRIS JupyterHub (https://jupyterhub.idris.fr) or extranet (https://extranet.idris.fr) if you are working from home

  • SSH socks proxy
ssh -D 5000 -N your-authorised-machine
  • change web browser proxy to use the socks proxy (on firefox it looks like this probably similar for other browsers)
    image

Use fixed jean-zay machine so that you keep your tmux sessions.

Host jean-zay
# 3 login nodes: jean-zay1, jean-zay2, jean-zay3 at the time of writing: 2019-11-04
# better to keep it fixed for example for your tmux sessions to be on the same host
hostname jean-zay1.idris.fr
ProxyCommand ssh -W %h:%p your-authorised-machine
user your-jean-zay-login

and explain the trade-off that this particular login node can go down in which case you need to edit your ~/.ssh/config or add more aliases for the other login nodes.

sshfs in combination with Tensorboard running locally

already documented in https://jean-zay-doc.readthedocs.io/en/latest/tips-and-tricks/#run-sshfs-tensorboard-locally

@lesteve
Copy link
Member Author

lesteve commented May 17, 2020

@rstrudel no pressure but if you had time to document how you use sshfs with Tensorboard running locally, I think this would be very helpful!

@lesteve
Copy link
Member Author

lesteve commented May 17, 2020

Currently I am not sure I really understand the official Jean Zay suggestion (http://www.idris.fr/jean-zay/pre-post/jean-zay-jupyter-notebook.html#pour_tensorboard_sous_jupyter_notebook) but going through their less than optimal Jupyter wrapper (idrjup) to use Tensorboard is just not great (to put this nicely)

@guhur
Copy link
Contributor

guhur commented Sep 18, 2020

Here how I do to setup jeanzay with sshfs:

mkdir -p $PREFIX/scratch/jeanzay
sshfs -o reconnect,ServerAliveInterval=15,ServerAliveCountMax=3 jean-zay:/path/to/your/scratch/ $PREFIX/scratch/jeanzay

@lesteve lesteve added the help wanted Extra attention is needed label Apr 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants