getsockopt TCP_NODELAY: Invalid argument

9 posts / 0 new
Last post
Pierre_Raym
Offline
Last seen: 6 years 5 months ago
Joined: 20.05.2011 - 16:55
getsockopt TCP_NODELAY: Invalid argument

 Hello guys,

I've been facing an issue that prevents me from remotely accessing one of my servers.

What I'm trying to do...

- SSH tunnel between a desktop and a Test Server (OK)

- SSH Port Forwarding using PuTTY (OK)

- RDP embedded in the SSH tunnel (towards the Test Server) => NOK

I'm 100% certain that the SSH tunnel is properly established between the remote desktop and the Test Server, and I can also RDP to the Test Server (without using copSSH at all).

=> What I'd like to do is RDP through the SSH tunnel (for obvious security reasons). When I try to do that, I get the following error in the copSSH server logs:

2011.05.21 06:33:48 -  debug3: channel 1: status: The following connections are open:\r\n  #0 server-session (t4 r256 i0/0 o0/0 fd 8/6 cc -1)\r\n

2011.05.21 06:33:48 -  debug1: channel 1: free: direct-tcpip, nchannels 2

2011.05.21 06:33:48 -  debug2: channel 1: garbage collecting

2011.05.21 06:33:48 -  debug2: channel 1: zombie

2011.05.21 06:33:48 -  error: connect_to XXX.XXX.XXX.XXX port 3389: failed.

2011.05.21 06:33:48 -  debug1: channel 1: connection failed: Operation not permitted

2011.05.21 06:33:27 -  debug3: channel 1: waiting for connection

2011.05.21 06:33:27 -  debug1: server_input_channel_open: confirm direct-tcpip

2011.05.21 06:33:27 -  debug1: channel 1: new [direct-tcpip]

2011.05.21 06:33:27 -  debug3: fd 7 is O_NONBLOCK

2011.05.21 06:33:27 -  debug3: fd 7 is O_NONBLOCK

2011.05.21 06:33:27 -  debug1: getsockopt TCP_NODELAY: Invalid argument

2011.05.21 06:33:27 -  debug1: connect_next: host XXX.XXX.XXX.XXX ([XXX.XXX.XXX.XXX]:3389) in progress, fd=7

2011.05.21 06:33:27 -  debug2: fd 7 setting O_NONBLOCK

2011.05.21 06:33:27 -  debug1: server_request_direct_tcpip: originator 0.0.0.0 port 0, target XXX.XXX.XXX.XXX port 3389

Could someone help me please ? I really don't want to use unsecure Windows RDP to get remote access to this Test Server !!! :-S

Thanks a lot in advance...

Best Regards,

Pierre

 

itefix
Offline
Last seen: 1 hour 4 min ago
Joined: 01.05.2008 - 21:33
Which Windows version do you

Which Windows version do you run into problems ? Is the firewall configured properly ?

Pierre_Raym
Offline
Last seen: 6 years 5 months ago
Joined: 20.05.2011 - 16:55
 Hello tk, I'm running

 Hello tk,

I'm running Windows Server 2008 R2 and as I said, I can establish an SSH session between the desktop and the server (I can see an active session on the copSSH Control Panel) so I guess the firewall is properly configured (SSH rule created for inbound and outbound traffic).

Regards,

Pierre

Pierre_Raym
Offline
Last seen: 6 years 5 months ago
Joined: 20.05.2011 - 16:55
 Could someone help me ? I've

 Could someone help me ? I've posted this message almost a month ago and still nothing... If you need any log/trace, I can do the test again !

Thanks a lot in advance for your consideration...

Best Regards,

Pierre

itefix
Offline
Last seen: 1 hour 4 min ago
Joined: 01.05.2008 - 21:33
How does your putty setup

How does your putty setup look like ? Do you have the problem with a one particular server ?

Pierre_Raym
Offline
Last seen: 6 years 5 months ago
Joined: 20.05.2011 - 16:55
 Hello tk, My PuTTY setup

 Hello tk,

My PuTTY setup looks like the following:

- SSH v2 towards the server IP@

- Tunnel / port forwarding: localhost:3390 => server_IP@:3389

And that's it basically...

No, I don't have the problem with one particular server. Same issue on all the servers where CopSSH is installed to get secure remote access.

Kind Regards,

Pierre

itefix
Offline
Last seen: 1 hour 4 min ago
Joined: 01.05.2008 - 21:33
Can you try port a higher

Can you try port a higher port number like 6000 instead of 3390 ?

Pierre_Raym
Offline
Last seen: 6 years 5 months ago
Joined: 20.05.2011 - 16:55
Hello tk, I tried to do SSH

Hello tk,

I tried to do SSH port forwarding on port 6700 (instead of 3390) but without success either.

I get the exact same debug logs on the CopSSH server:

2011.06.22 06:57:49 -  debug3: channel 1: status: The following connections are open:\r\n  #0 server-session (t4 r256 i0/0 o0/0 fd 8/6 cc -1)\r\n

2011.06.22 06:57:49 -  debug1: channel 1: free: direct-tcpip, nchannels 2

2011.06.22 06:57:49 -  debug2: channel 1: garbage collecting

2011.06.22 06:57:49 -  debug2: channel 1: zombie

2011.06.22 06:57:49 -  error: connect_to XXX.XXX.XXX.XXX port 3389: failed.

2011.06.22 06:57:49 -  debug1: channel 1: connection failed: Operation not permitted

2011.06.22 06:57:28 -  debug3: channel 1: waiting for connection

2011.06.22 06:57:28 -  debug1: server_input_channel_open: confirm direct-tcpip

2011.06.22 06:57:28 -  debug1: channel 1: new [direct-tcpip]

2011.06.22 06:57:28 -  debug3: fd 7 is O_NONBLOCK

2011.06.22 06:57:28 -  debug3: fd 7 is O_NONBLOCK

2011.06.22 06:57:28 -  debug1: getsockopt TCP_NODELAY: Invalid argument

2011.06.22 06:57:28 -  debug1: connect_next: host XXX.XXX.XXX.XXX ([XXX.XXX.XXX.XXX]:3389) in progress, fd=7

2011.06.22 06:57:28 -  debug2: fd 7 setting O_NONBLOCK

2011.06.22 06:57:28 -  debug1: server_request_direct_tcpip: originator 0.0.0.0 port 0, target XXX.XXX.XXX.XXX port 3389

 Any other idea that could explain this behavior ?

Thanks a lot in advance...

Best Regards,

Pierre

itefix
Offline
Last seen: 1 hour 4 min ago
Joined: 01.05.2008 - 21:33
Do you still have the problem

Do you still have the problem ? The message 'operation not permitted' can be related to  permissions of the service account. You can also rund sshd in debug mode to pinpoint server-realted issues. See FAQ How can I run Openssh daemon in debug mode ? for more information.