Skip to main content

ssh


  • SSH with algorithms:
ssh john@X.X.X.X \
-o KexAlgorithms=diffie-hellman-group14-sha1 -oHostKeyAlgorithms=+ssh-dss
  • Check if SSH service is running:
sudo ss -antlp | grep sshd
  • SCP on another port:
scp -o "UserKnownHostsFile=/dev/null" -o "StrictHostKeyChecking=no" \
-P 1337 john@X.X.X.X:/etc/passwd .
  • Local port forwarding:
ssh -N -L bind_address:port:host:hostport username@address
  • Dynamic port forwarding:
ssh -N -D address_to_bind_to:port_to_bind_to username@X.X.X.X