From Igor personal wiki
Jump to: navigation, search

My ssh config file:

Host *
#  ServerAliveInterval 60 

#======= Cloud servers

        User ec2-user
        IdentityFile /.ssh/amazon.pem
        LocalForward 8080 localhost:80
        DynamicForward localhost:3128
        ServerAliveInterval 60
#======= Company servers

Host yul*
        User Thor

SSH SOCKS proxy:

in config file

Host IP
DynamicForward localhost:3128

in command line

ssh -D 2001

SSH dynamic tunneling through FW

DynamicForward localhost:3128
ProxyCommand /usr/bin/nc -x localhost:3128 %h %p

Local port forward for anyone at home net !

If you want other people on your home subnet to be able to reach the machine at work by SSH, add the option -g :

$ ssh -L 10000: -g

We now see the service is available on all interfaces on your home computer, available for anyone to connect to on the local subnet :

$ netstat -tunelp | grep 10000
tcp 0 0* LISTEN 1000 72265 12543/ssh

SSH -key regeneration

convert Putty public key to OpenSSH format

ssh-keygen -i -f

Generate public key from private

ssh-keygen -y -f /path/to/private/key