My college uses a proxy server with firewall for providing internet. I am unable to make a ssh connection to my AWS instance through my college internet, though I can do so through my data modem. I want to check if my proxy server firewall allows port 22/ssh connection or not?


You can use netcat to test this:

if nc -z remote.host.example.com 22; then
    echo "Connection to TCP/22 succeeded"
    echo "Connection to TCP/22 failed"
  • I don't know about netcat, will you please tell me how can I use netcat? – Rishabh Agrahari Jun 19 '16 at 7:00
  • It's a handy tool for testing (and using) network connections. You can install it with sudo apt install netcat, and read all about it with man nc. – DopeGhoti Jun 19 '16 at 8:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.