ssh

ssh troubleshootings

Create a key pair for ssh RSA 4096 bits ssh-keygen -b 4096 ECDSA ssh-keygen -t ecdsa -b 521 Create only a RSA private key and out the public key openssl genpkey -algorithm RSA -out .ssh/id_rsa -pkeyopt rsa_keygen_bits:4096 chmod 600 .ssh/id_rsa ssh-keygen -y -f .ssh/id_rsa >> .ssh/id_rsa.pub Note: These commands just create keys, and .ssh/id_rsa.pub format is not for ssh authorized_keys. Connection closed by {{ ip_address }} In my case, checked PAM in /etc/security/access.

SSH snippets

Local Port forwarding ssh -L 50088:remote2.myserver.com:80 atlex@remote1.myserver.com SSH portforwarding in backgraound ssh -fNT -L 8888:localhost:8888 myuser@mydomain.com official mannual -f: Requests ssh to go to background just before command execution. -N: Do not execute a remote command. This is useful for just forwarding ports (protocol version 2 only). -T: Disable pseudo-tty allocation.