Git ssh error: port 22: no route to host

Your INPUT chain accepts everything. You haven't shown your OUTPUT chain, but I'll assume that it accepts everything too. This implies that the connection is blocked somewhere between you and Github. It is possible that your school's firewall blocks outgoing connections to port 22.

You can get a better idea of where your packets are intercepted by installing tcptraceroute Install tcptraceroute and running tcptraceroute github.com 22.

Ask your school's administrator to open port 22, or at least (if they're reluctant) port 22 to github.com. Your use of the network is a serious use, which should be allowed to students.

If the administrators do not budge, and you use a proxy to connect to the web, you might be able to get the proxy to relay traffic (it may or may not work, depending on how the proxy is configured). See Is it possible to SSH through port 80?

By the way, your INPUT chain allows all incoming traffic, since you only have ACCEPT rules and an ACCEPT policy. A typical rule set would block incoming UDP traffic on non-vetted ports and block incoming TCP connections on non-vetted ports:

iptables -A INPUT -i lo -j ACCEPT
iptables -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables -A INPUT -p udp --dport 53 -j ACCEPT
iptables -A INPUT -p udp --dport 123 -j ACCEPT
iptables -P INPUT DROP

Based on your comment, it's almost certain that the school has some sort of filter in place to block either all non port 80 traffic or all non-whitelisted traffic. You could probably get away with a SSH HTTP tunnel as documented here, or you could try a browser based ssh client as shown here.