LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-26-2016, 07:19 AM   #1
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Rep: Reputation: Disabled
rdesktop can't conect remote pc with reverse ssh tunnel


Pc a can't connect pc b directly.No firewall build on both pc a and pc b.
Pc b is running win7 ,port 3389 is opened for remote desktop connection.
A reverse ssh tunnel created on pc b.

ssh -fNg -R 10020:127.0.0.1:3389 root@vps_ip

Now to login into vps_ip from pc a.

ssh root@vps_ip
rdesktop 127.0.0.1:10020
ERROR: Failed to open display:

How to rdesktop my pc b?
 
Old 07-26-2016, 08:56 AM   #2
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
Have you tried to add the option -X (or -Y) to ssh?
 
Old 07-28-2016, 09:06 AM   #3
jnihil
Member
 
Registered: Dec 2012
Location: inside the matrix
Distribution: Debian, Xubuntu, Gentoo, Antergos
Posts: 90

Rep: Reputation: 27
Like gda wrote, you can't start an X program from an ssh terminal without specifying the X DISPLAY.
After the tunnel is setup, you could try something like:
Code:
$ ssh -X root@vps_ip xterm

then, at the xterm session:

$ rdesktop 127.0.0.1:10020
 
Old 07-31-2016, 02:42 AM   #4
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
ssh -X root@vps_ip
root@vps_ip's password:
Last login: Sun Jul 31 03:28:58 2016 from 114.114.114.114
/usr/bin/xauth: file /root/.Xauthority does not exist
[root@localhost ~]# rdesktop 127.0.0.1:10020
ERROR: 127.0.0.1: unable to connect

I got strange error info.
 
Old 07-31-2016, 03:12 AM   #5
gda
Member
 
Registered: Oct 2015
Posts: 130

Rep: Reputation: 27
Probably that's because the port 10020 is not forward anymore on the 3389 on which pc b is actually listening.
 
Old 08-03-2016, 06:18 AM   #6
jnihil
Member
 
Registered: Dec 2012
Location: inside the matrix
Distribution: Debian, Xubuntu, Gentoo, Antergos
Posts: 90

Rep: Reputation: 27
As gda said.
I did write "After the tunnel is setup".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH Reverse Tunnel - ~/.ssh/config - PHP marcelp1 Linux - Newbie 1 05-28-2014 12:49 AM
[SOLVED] ssh reverse tunnel vib150 Linux - Networking 16 10-27-2013 09:22 PM
[SOLVED] Reverse SSH tunnel edan Linux - Security 3 07-14-2010 09:37 PM
LXer: remote control android, a reverse ssh tunnel LXer Syndicated Linux News 0 05-18-2010 10:50 AM
Reverse SSH Tunnel sniggleflop Linux - Security 1 10-13-2002 01:24 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 03:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration