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

Lesson: Setting up SSH config #67

Open
mahesh-panchal opened this issue Dec 2, 2024 · 0 comments
Open

Lesson: Setting up SSH config #67

mahesh-panchal opened this issue Dec 2, 2024 · 0 comments

Comments

@mahesh-panchal
Copy link
Collaborator

mahesh-panchal commented Dec 2, 2024

Setting up ssh config

  • How to set up ssh for Rackham, Dardel, NAC.
  • How to use a jump host.
  • How to use port forwarding (browsing webpages locally running on cluster, running jupyter/marimo on a cluster).
  • Agent forwarding
  • Dynamic forwarding: Use the login node as a jump host to the nodes.

Example:

# Example for your HPC cluster
Host hpc_cluster
    HostName cluster.example.com  # The actual hostname or IP address
    User your_username          # Your username on the cluster
    Port 22                     # SSH port (default is 22)
    IdentityFile ~/.ssh/id_rsa_hpc # Path to your private key for the cluster
    # Forward your local port 8888 to the cluster's port 8888 (for Jupyter)
    LocalForward 8888 localhost:8888  # If Jupyter running on the login node
    # OR, if Jupyter running on a worker node, and you know the worker node's internal IP:
    # LocalForward 8888 worker_node_internal_ip:8888
    # OR, for dynamic port forwarding to a worker node (more complex, see below):
    # DynamicForward 8888
    # If using a jump host to access worker nodes:
    # ProxyJump jump_host_user@jump_host:port


# Example for a specific worker node (if you connect directly)
Host worker1
    HostName worker1.internal.cluster  # Internal IP or hostname
    User your_username
    IdentityFile ~/.ssh/id_rsa_hpc
    # No ProxyJump needed if connecting directly

# Example for a jump host (if needed for worker node access)
Host jump_host
    HostName jump_host.example.com
    User jump_host_user
    IdentityFile ~/.ssh/id_rsa_jump


# Example for your local machine (less common, but can be useful)
Host localhost
    User your_local_username  # Useful if different from your system username
    IdentityFile ~/.ssh/id_rsa_local # Optional, if you use a specific key for local

Extra: sshfs to mount remote directories locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant