Client config
In the user's directory, in the subfolder ".ssh", edit/create the file "config":
Host *
ServerAliveInterval 30
ServerAliveCountMax 3
TCPKeepAlive no
Host NAME_USED_FOR_OPENING_CONNECTION
HostName IP
Port PORT
User USERNAME
...
To enable passwordless login:
ssh-keygen # if not done before
ssh-copy-id -p 2222 USER@IP