Warning: remote port forwarding failed for listen port 52698

后端 未结 5 2008
萌比男神i
萌比男神i 2021-01-30 13:00

I\'m using SSH to access my university\'s afs system. I like to use rmate (remote TextMate), which requires SSH tunneling, so I included this alias in my .bashrc. <

相关标签:
5条回答
  • 2021-01-30 13:27

    I had another SSH connection open. I just needed to close that connection before I opened my SSH tunnel.

    Further Explanation: Once one ssh connection has been established, subsequent connections will produce a message:

    Warning: remote port forwarding failed for listen port 52698

    This message is harmless, as the forward can only be set up once and one forward will work for all ssh connections to the same machine. The original ssh session that opened the forward will stay open when you exit the shell until all remote editing sessions are finished.

    0 讨论(0)
  • 2021-01-30 13:31

    In my case, the problem was that the remote system didn't have DNS properly set up, and it couldn't even resolve its own hostname. Make sure you have a working DNS in /etc/resolv.conf at the remote system.

    0 讨论(0)
  • 2021-01-30 13:39

    I experienced this problem, but it was while connecting to a server on which I don't have sudo priviliges, so the top response suggesting runing sudo netstat ... wasn't feasible for me.

    I eventually figured out it was because there were still instances of rmate running, so I used ps to list the running processes and then kill -9 pid (where pid is the process ID for rmate).

    0 讨论(0)
  • 2021-01-30 13:42

    I had the same problem. In order to find the port that is already open, you have to issue this command on the 'corn.myschool.edu' computer:

    sudo netstat -plant  | grep 52698
    

    And then kill all of the processes that come up with this (replace xxxx with the process ids)

    sudo kill -9 xxxx
    

    (UPDATED: changed the option to be -plant as it is a nice mnemonic)

    0 讨论(0)
  • 2021-01-30 13:51

    This solved my problem reported here as well. To avoid this notification "AllowTcpForwarding" should be enabled in SSH config.

    0 讨论(0)
提交回复
热议问题