SSH Port Forwarding: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 33: Line 33:
#PrintLastLog yes
#PrintLastLog yes
#TCPKeepAlive yes
#TCPKeepAlive yes
</source>
<source lang="bash">
systemctl restart sshd
service sshd restart
</source>
</source>



Revision as of 07:19, 30 May 2020

Local Forwarding

Python Flask
ssh -L 5000:localhost:5000 [email protected]
http://localhost:5000/
RabbitMQ
ssh -L 15672:localhost:15672 [email protected]
http://localhost:15672/
username: guest
password: guest
Node Red
ssh -L 1880:localhost:1880 [email protected]
http://localhost:1880/
Mosquitto
ssh -L 1883:localhost:1883 [email protected]

Remote Forwarding

nano /etc/ssh/sshd_config

GatewayPorts no|yes| clientspecified
#AllowAgentForwarding yes
#AllowTcpForwarding yes
GatewayPorts clientspecified
X11Forwarding yes
#X11DisplayOffset 10
#X11UseLocalhost yes
#PermitTTY yes
PrintMotd no
#PrintLastLog yes
#TCPKeepAlive yes
systemctl restart sshd
service sshd restart

References