====== SSH ====== ===== sudo aptitude install ===== ''openssh-server'' ===== Running SSH on non-standard port ===== - ''/etc/ssh/sshd_conf'' → Parameter "Port" - ''/etc/init.d/ssh restart'' ===== Login on non-standard port ssh system ===== ''ssh -p @'' ===== SSH Client ==== Following lines create config file, which enables X forwarding. -X doesn't need to be typed anymore. In addition to that it forces the client to send a keep alive packet every 5 seconds. cat >.ssh/config Host * ForwardAgent yes ForwardX11 yes ServerAliveInterval 5 ctrl+c finishes operation. ===== Remove hostkey from known_hosts ==== ssh-keygen -R removes the hostkey of from ''~/.ssh/known_hosts''. ===== SSH Tunnel (e.g. for remote MySQL) ===== - ''ssh -N -L 3307::3306 @'' or sometimes ''3307:localhost:3306'' - ''mysql -u -p -P 3307 -h127.0.0.1'' Aternative Way: ''ssh -C -f -L 3307:localhost:3306 @ sleep 10; mysql -u -p -P 3307 -h127.0.0.1'' This creates a auto-closing tunnel with compression (-C) enabled.