Skip to content

Instantly share code, notes, and snippets.

@rounakdatta
Created May 17, 2019 19:18
Show Gist options
  • Save rounakdatta/419cc56071e05e864e12e34f1be3a96a to your computer and use it in GitHub Desktop.
Save rounakdatta/419cc56071e05e864e12e34f1be3a96a to your computer and use it in GitHub Desktop.
Connecting through SSH on SRM Network

Remote Machine Configurations

  1. Ensure you're on a non-SRM network. Access the remote machine first as: sudo ssh -i yourkey.pem [email protected]
  2. Execute nano /etc/ssh/sshd_config and change #PORT 22 to PORT 443. This ensures the remote machine has its SSH daemon listening on port 443.
  3. Execute sudo systemctl restart ssh.service to restart the daemon.
  4. Ensure that it is actually listening on port 443: sudo netstat -nupt -l.
  5. Goto your AWS/DO/GCP web console and configure the Inbound ports. You generally would have to create a new Inbound rule (HTTPS-TCP-443-0.0.0.0/0).

Your Machine Configurations

  1. Ensure you're on SRM Network.
  2. Execute nano /etc/ssh/sshd_config and change #PORT 22 to PORT 443. This ensures your machine has its SSH daemon listening on port 443.
  3. Execute sudo systemctl restart ssh.service to restart the daemon.
  4. Ensure that it is actually listening on port 443: sudo netstat -nupt -l.
  5. Finally, try connecting to the remote machine as: sudo ssh -i yourkey.pem -D 8080 [email protected] -p 443

Remember: Replace 12.345.67.890 with your remote machine IP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment