My question is, put simply
Is there any AMI that comes with SSH configured on port 443?
The main reason why I ask is that, despite working in IT, my company filters all ports but 443 and 80, and requires all my connections to go through an HTTP proxy.
I have connected via SSH before on hosts that accept ssh on port 443, using corkscrew. A friend of mine is still able to do that, but it involves leaving the office or using a VPN to connect to the amazon instance, changing the line in the SSHD config, and restarting SSH.
Is there an AMI that has that done by default?
You can accomplish your goal of running sshd on an alternative port like 80 or 443 with a standard EC2 instance, as long as the AMI supports user-data scripts that run when the instance first boots. Both Amazon Linux and Ubuntu AMIs support this with CloudInit.
For example, you can start an Ubuntu EC2 instance with the following user-data:
#!/bin/bash -ex
perl -pi -e 's/^#?Port 22$/Port 443/' /etc/ssh/sshd_config
service sshd restart || service ssh restart
and after it boots, you can ssh in to port 443.
Here's an article I wrote a couple years ago describing this method: http://alestic.com/2010/12/ec2-ssh-port-80
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With