I tried translate command
ssh -R 80:localhost:8080 nokey@localhost.run (It works as it should, problem not in server)
to Paramiko with help of https://github.com/paramiko/paramiko/blob/master/demos/rforward.py
My code:
import paramiko
from rforward import reverse_forward_tunnel
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect(username="nokey", hostname="localhost.run")
transport = ssh.get_transport()
reverse_forward_tunnel(8080, "localhost.run", 80, transport)
But it fails with:
Traceback (most recent call last): ...
raise SSHException("TCP forwarding request denied") paramiko.ssh_exception.SSHException: TCP forwarding request denied
Help pls