Mikko Kortelainen

Tag: OpenSSH

Tunneling SSH over HTTPS with stunnel

I was faced with a firewall denying access to the outside world using ssh. All I had was http/https access via a proxy server which required authentication. I had an Ubuntu jump host outside the network connected to the internet with a free 443 port. I tried accessing that …

read more

Keeping SSH Tunnels Up With Autossh

To keep an ssh connection with a tunnel for port forwarding  up reliably we can use the autossh command by Carson Harding. If the connection drops, autossh will restart it. Here's a quick recipe to forward local port 33306 to a remote MySQL host listening on port 3306:

# Install autossh …
read more

OpenSSH public key authentication

First, create a key-pair with ssh-keygen. This is a one-time operation.

ssh-keygen -t dsa

It is good practice to enter a good password, but you may also leave the password empty. That will leave your private key vulnerable to local attacks, but if you need to login somewhere from a …

read more

SSH tunneling your way through multiple gateways

Ths SSH protocol supports tunneling arbitrary ports from your local host to a remote network that is only reachable through a remote gateway machine. The typical situation is that you have a, say, web server in a network which is only accessible from inside the network. If you have an …

read more