1. Access the intranet Raspberry Pi through port forwarding
ssh -CfNg -R 2222:127.0.0.1:22 [email protected]
Problem Description:
Hello, the intranet machine and the extranet machine have established a link, the port is 2222, it is normal to say that on the extranet machine ssh -p 2222 localhost can log in to the intranet machine, but ssh_exchange_identification: Connection closed by remote host This error occurs... .... the gatewayport in /etc/ssh/sshd_config is already yes.... May I ask what is the problem~
I haven't encountered this problem before, so I searched online. The solution is to modify the /etc/hosts.allow file, add sshd:ALL, restart the sshd service after the modification, and try to see if it can connect. Please let me know if it is resolved :)
2. Build various servers with Raspberry Pi (Raspberry Pi)
https://blog.csdn.net/gaochaoweino/article/details/78738358