starting a ssh tunnel with xinetd
"Paul Herbosch" <[email protected]> Thu, 14 Aug 2003 12:25:37 +0200
| Newsgroups | gmane.network.xinetd |
|---|---|
| Message-ID | <[email protected]> |
Hi all,
I'm trying to automatically open up a ssh tunnel to a W2K Terminal Server
using xinetd.
so far, all attempts to let xinetd start the tunnel, failed.
well, xinetd opens up the tunnel allright, but still my rdesktop client
fails to connect.
when I open the tunnel by hand, everything works great.
"ssh -g -T -N -x -i /home/sshunnel/.ssh/id_rsa -L3389:[remote w2k
server]:3389 sshunnel@[remote linux server]"
I tell my windows rdesktop client to connect to the linux box that initiated
the tunnel, and off I go.
now, here's my /etc/xinetd.d/rdesktop-tunnel file:
service rdesktop-tunnel
{
disable = no
socket_type = stream
protocol = tcp
wait = no
user = sshunnel
server = /usr/bin/ssh
server_args = -g -T -N -x -i /home/sshunnel/.ssh/id_rsa -L3389:[remote w2k
server]:3389 sshunnel@[remote linux server]
}
I defined a services in /etc/services
rdesktop-tunnel 3389/tcp
rdesktop-tunnel 3389/udp
if a I start my rdesktop-client, I can see xinetd starting the ssh tunnel.
the remote linux server has a ssh session for user sshunnel running,
but my rdesktop cient throws an error:
"Because of a protocol error detected at the client (code 0x1104), this
session will be disconnected.
Please try connecting to the remote computer again."
If I change the wait parameter to yes in /etc/xinetd.d/rdesktop-tunnel
i get a time-out.
apparantly, xinetd fiddles with tcp/3389 for some reason ...
Any help would be greatly appreciated.
Greetz, Paul