Created
March 22, 2016 11:51
-
-
Save a-h/83cc0ca2d34ba0ab7e03 to your computer and use it in GitHub Desktop.
Connecting to Remote SSH Servers via a Proxy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Download and install corkscrew to connect to AWS through the proxy. | |
| sudo yum install -y gcc git | |
| git clone https://github.com/elia/corkscrew | |
| cd corkscrew | |
| sudo ./configure make | |
| sudo make install | |
| cd .. | |
| # Access remote servers with the following command line | |
| # ssh ec2-user@54.171.212.46:443 -i ~/ssh_key.pem -o "ProxyCommand corkscrew 10.0.2.2 3128 %h %p" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash -xe | |
| sed -i 's/\#Port 22/Port 22\nPort 443/' /etc/ssh/sshd_config | |
| service sshd restart || service ssh restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment