ssh troubleshootings

Create a key pair for ssh RSA 4096 bits ssh-keygen -b 4096 ECDSA ssh-keygen -t ecdsa -b 521 ssh-keygen -t ed25519 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/ Note: These commands just create keys, and .ssh/ 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 SSH portforwarding in backgraound ssh -fNT -L 8888:localhost:8888 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. Config file Host User git Port 22 Hostname IdentityFile ~/.ssh/id_ecdsa TCPKeepAlive yes IdentitiesOnly yes Host myserver*.