SSH Port Forwarding: Difference between revisions
Jump to navigation
Jump to search
| (One intermediate revision by the same user not shown) | |||
| Line 22: | Line 22: | ||
GatewayPorts no|yes| clientspecified | GatewayPorts no|yes| clientspecified | ||
< | <syntaxhighlight lang="ini" highlight="3" start="86" line> | ||
#AllowAgentForwarding yes | #AllowAgentForwarding yes | ||
AllowTcpForwarding yes | AllowTcpForwarding yes | ||
| Line 33: | Line 33: | ||
#PrintLastLog yes | #PrintLastLog yes | ||
#TCPKeepAlive yes | #TCPKeepAlive yes | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="ini"> | ||
Match User pi | Match User pi | ||
AllowTcpForwarding yes | AllowTcpForwarding yes | ||
GatewayPorts yes | GatewayPorts yes | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
systemctl restart sshd | systemctl restart sshd | ||
service sshd restart | service sshd restart | ||
</ | </syntaxhighlight> | ||
< | <syntaxhighlight lang="bash"> | ||
ssh user@cdn.chorke.org -R 10.19.83.10:80:cdn.chorke.org:1983 | ssh user@cdn.chorke.org -R 10.19.83.10:80:cdn.chorke.org:1983 | ||
ssh user@cdn.chorke.org -R 10.19.83.10:80:localhost:1983 | ssh user@cdn.chorke.org -R 10.19.83.10:80:localhost:1983 | ||
| Line 54: | Line 54: | ||
ssh user@cdn.chorke.org -R 80:1983 | ssh user@cdn.chorke.org -R 80:1983 | ||
ssh user@cdn.chorke.org -R 80 | ssh user@cdn.chorke.org -R 80 | ||
</ | </syntaxhighlight> | ||
==References== | ==References== | ||
| Line 71: | Line 71: | ||
| valign="top" | | | valign="top" | | ||
* [https://serverfault.com/questions/1159599/ SSH server » Ubuntu » Change the default port] | |||
* [https://stackoverflow.com/questions/4549945/ <code>rsync</code> » Specify a different ssh port] | * [https://stackoverflow.com/questions/4549945/ <code>rsync</code> » Specify a different ssh port] | ||
* [[Bastion SSH Tunneling]] | * [[Bastion SSH Tunneling]] | ||
Latest revision as of 17:51, 1 November 2024
Local Forwarding
Python Flask ssh user@cdn.chorke.org -L 5000:localhost:5000 http://localhost:5000/
RabbitMQ ssh user@cdn.chorke.org -L 15672:10.19.83.10:15672 http://localhost:15672/ username: guest password: guest
Node Red ssh user@cdn.chorke.org -L 1880:localhost:1880 http://localhost:1880/
Mosquitto ssh user@cdn.chorke.org -L 1883:localhost:1883
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
Match User pi
AllowTcpForwarding yes
GatewayPorts yes
systemctl restart sshd
service sshd restart
ssh user@cdn.chorke.org -R 10.19.83.10:80:cdn.chorke.org:1983
ssh user@cdn.chorke.org -R 10.19.83.10:80:localhost:1983
ssh user@cdn.chorke.org -R 10.19.83.10:80:0.0.0.0:1983
ssh user@cdn.chorke.org -R 10.19.83.10:80::1983
ssh user@cdn.chorke.org -R localhost:80::1983
ssh user@cdn.chorke.org -R 80:1983
ssh user@cdn.chorke.org -R 80
References
|