The isp I am currently connected to only has port 80 open, but I need to ssh to my server which listens on port 22 of my router there. Is there a way to go out through port 80 here, then in through 22 there?
Is weird that your outbound only allows port 80, but whatever. You can redirect all connections to port 80 to port 22 using iptables or make the SSH server listen the port 80 too.
iptables -t nat -I PREROUTING --src 0/0 --dst YOURSERVERIP -p tcp --dport 80 -j REDIRECT --to-ports 22
Modifying your server ssh configuration:
sed '/\#Port\ 22/Port 80/' /etc/ssh/sshd_config | grep 80
If everything is ok, use:
sudo sed -i '/\#Port\ 22/Port 80/' /etc/ssh/sshd_config
First off I feel like I am reading your question incorrectly. I understand it as saying that you are only allowed outbound traffic on port 80. This means to me that you need to communicate from port 80 to your servers port 22. Fortunately, this is completely possible using backpipes and netcat. Here is the process:
First, create your backpipe:
# mknod backpipe p
Next, make a netcat listener that connects your backpipe and sends the information out the port of your choosing (80), to a port of your choosing (22):
# nc -l -p 222 0<backpipe | nc -p 80 SERVERIP 22 | tee backpipe
Finally, just connect to your listening port!
# ssh firstname.lastname@example.org -p 222
Here's a breakdown of the backpipe line for the curious:
nc -l -p 222 0<backpipe
This sets up a netcat listener that listens on port 222 (you can change this to whatever port you want, I just picked 222) and sends all the data into your backpipe.
nc -p 80 SERVERIP 22
This sets a source port of 80 to SERVERIP port 22. This is the connection the OP wanted in his post, but we want to shuttle an SSH connection through this, thus the need for a backpipe.
This sends your STDOUT to the backpipe, and also to your terminal. If you don't want to see the data you could replace it with this line:
# nc -l -p 222 0<backpipe | nc -p 80 SERVERIP 22 1> backpipe