Remote sshd prompt: server unexpectedly closed network connection

[root@xx]# vim /etc/sshd_config // modify port 3330
[root@xx]# iptables -i inpu-p TCP — dport 3330-j ACCEPT // add firewall 3330 port allow
[root@xx]# service iptables save // save rule
[root@xx]# service SSH Restart SSH //

Read More: