SSHTunnel
A secure shell (SSH) tunnel consists of an encrypted tunnel created through a SSH protocol connection. Users may set up SSH tunnels to transfer unencrypted traffic over a network through an encrypted channel.
Netbios SSH tunnel
Entities:
- SSH server: 10.1.1.123
- user on ssh server: root
- Netbios server (Samba): 192.168.3.4
- SSH client: 192.168.3.15
- Ports 139 and 445 on Netbios server
- Ports 139 and 445 must be free in the SSH server
The SSH server on the file /etc/ssh/ssh_config must have GatewayPorts yes.
The SSH client must be able to reach the SSH server and the netbios server.
On the ssh client, issue the following commands:
ssh root@10.1.1.123 -R 139:192.168.3.4:139 sleep 99999
ssh root@10.1.1.123 -R 445:192.168.3.4:445 sleep 99999
Now the Netbios server can be reached through ports 139 and 445 in the SSH server.