LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-26-2018, 12:37 PM   #1
sparkling
LQ Newbie
 
Registered: Apr 2017
Posts: 20

Rep: Reputation: Disabled
Cannot setup the second SSH tunnel to a remote host


Hi all,

I have two identical remote servers (with different IPs of course) and am trying to setup a SSH tunnel to them on port 443. I can successfully setup a tunnel to the server01 but not to the server02. I don't need to have both tunnels running at the same time but I am really puzzled because only the first one works.

Both servers are only accessible via a proxy server so no difference there either. When I ssh into the server01, I can easily go to the browser and access the GUI on 127.0.0.1:443 (https://127.0.0.1 to be exact).

But when I close the connection to the first server and SSH into the second server, the GUI will not come up.

Here is my SSH config file:

Host server01
HostName 10.11.12.6
ProxyCommand ssh proxy-staging -W %h:%p
IdentityFile ~/.ssh/id_rsa_user
User centos
LocalForward 443 127.0.0.1:443

Host server02
HostName 10.11.12.80
ProxyCommand ssh proxy-staging -W %h:%p
IdentityFile ~/.ssh/id_rsa_user
User centos
LocalForward 443 127.0.0.1:443


Can someone please help me figure this out please?

Thanks in advance
 
Old 02-27-2018, 05:51 AM   #2
descendant_command
Senior Member
 
Registered: Mar 2012
Posts: 1,876

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
What's the GUI?
 
Old 02-27-2018, 08:52 AM   #3
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,371

Rep: Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749Reputation: 2749
Perhaps check the contents of sshd_config on the two servers, to see if X11Forwarding is allowed on one but not the other.
 
Old 02-27-2018, 10:01 AM   #4
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
I sense some confusion* here. The server normally listening and responding on port 443 is secure httpd...that is not "SSH", which normally runs on port 22.

Of course, you can configure ssh to use another port (I don't run sshd on port 22), but choosing 443 is going to conflict with any secure httpd configuration. And, given what you've posted about the sshd.config, you don't appear to be doing that.

If you are connecting with a browser to https://127.0.0.1, you are not using ssh, but rather secure httpd, the configuration for which is in /etc/httpd* directories and files.

Please clarify what you're trying to do...
Also please use tags to post code segments.

*admit that confusion might be mine
 
  


Reply



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 tunnel to localhost is on the remote host not comming from 127.0.0.1 amiba Linux - Networking 7 03-09-2016 05:36 AM
SSH tunnel to remote host greyarea Linux - Networking 1 12-06-2013 10:03 AM
What host does an SSH revers tunnel connect as? fhsm Linux - Networking 7 05-04-2012 10:40 PM
Connect to a proxy through a middle host with a ssh tunnel iacchi Linux - Networking 3 02-16-2012 12:02 PM
Remote Desktop using SSH tunnel..... help! redhatbeatswin Linux - Newbie 5 08-14-2004 11:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:10 AM.

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