Skip to content

Instantly share code, notes, and snippets.

@adityaruplaha
Last active August 30, 2025 18:31
Show Gist options
  • Select an option

  • Save adityaruplaha/10f26830dc886539c3a398510d1422ef to your computer and use it in GitHub Desktop.

Select an option

Save adityaruplaha/10f26830dc886539c3a398510d1422ef to your computer and use it in GitHub Desktop.
ISI SSH Config
Match host isical-gateway exec "dig www.isical.ac.in | grep www-in"
# We are inside ISI's network, use internal IP for gateway access.
HostName 192.168.143.100
Host isical-gateway
HostName gateway.isical.ac.in
User <insert here>
Port 2222
PreferredAuthentications password
DynamicForward 11000
GatewayPorts yes
LocalForward 11143 mail.isical.ac.in:143
LocalForward 11025 mail.isical.ac.in:25
# ProxyJump --> ProxyCommand "ssh -W" --> ClearAllForwardings yes; which we do NOT want.
ClearAllForwardings no
ControlPath ~/.ssh/cm-%r@%h:%p
ControlMaster auto
ControlPersist 10m
Match host isical-*
# We are tring to reach ISI, first connect to the gateway so that ports are forwarded properly.
ProxyJump isical-gateway
Host isical-csscadm
HostName www.isical.ac.in
User <insert here>
PreferredAuthentications publickey,password
IdentityFile ~/.ssh/isical_ed25519
IdentitiesOnly yes
RequestTTY yes
ControlPath ~/.ssh/cm-%r@%h:%p
ControlMaster auto
ControlPersist 10m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment