3

I'm trying to do a port forwarding with ssh using this command:

ssh -L 9540:localhost:8011 user@ipdest

The port is for HTTPS traffic, I’m not getting any kind of error when I run the command, actually I get the ssh connection to the destination IP.

The problem is that when I try to connect with the browser to the URL localhost:9540 it doesn’t show anything, I’m not able to reach the HTTPS service.

1 Answer 1

3

Can you please check the sshd config file with the below command and make sure that the lines in bold are like the example?

more  /etc/ssh/sshd_config

#AllowAgentForwarding yes

AllowTcpForwarding yes

#GatewayPorts no

X11Forwarding yes

#X11DisplayOffset 10

#X11UseLocalhost yes

#PermitTTY yes

PrintMotd no

#PrintLastLog yes

#TCPKeepAlive yes

#PermitUserEnvironment no

#Compression delayed

#ClientAliveInterval 0

#ClientAliveCountMax 3

#UseDNS no

#PidFile /var/run/sshd.pid

#MaxStartups 10:30:100

PermitTunnel yes

#ChrootDirectory none

#VersionAddendum none

If not please set the lines as the example and restart the sshd service, try to connect again and test your tunnel again.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.