# SSH ## Generate public key from private ```bash ssh-keygen -f id_rsa -y > id_rsa.pub ``` ## Port forwarding ```bash # forward : 172.16.0.1:80 -> 172.16.0.2 -> 127.0.0.1:4080 ssh -f -N -L 4080:172.16.0.1:80 172.16.0.2 ``` ## Allow old algorithm ```bash ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 -oHostKeyAlgorithms=+ssh-dss 172.16.0.1 ``` # Options ServerAliveInterval