Re: ssh port forwarding for telnet does not work?

From: Unruh (unruh-spam_at_physics.ubc.ca)
Date: 06/10/05


Date: 10 Jun 2005 15:17:11 GMT

vleung2@yahoo.com writes:

>Hi all,

>ssh -L 9000:host2:23 test@host2
> -- this statement works and come back asking me to login the
>password.

>telnet localhost 9000
> returns telnet:unable to connect to remote host:connection refused.

Why should this work? Have you tried connecting in this way to an sshd that
you know works?

telnet host 23
Trying 142.103.234.x...
telnet: connect to address 142.103.234.x: Connection refused
telnet: Unable to connect to remote host: Connection refused

host is a computer that accepts and is accepting ssh connection.

>Anybody has any idea why port forwarding is not working?

You just told us it was (ssh works)

>I have set the sshd_config:
>AllowTcpForwarding yes
>GatewayPorts yes
>X11Forwarding yes



Relevant Pages

  • Re: No route to host
    ... route to host" is returned. ... three telnet tests to try and the results are below. ... Connection closed by foreign host. ...
    (comp.mail.sendmail)
  • Re: Networking Problems with Telnet
    ... Is the application on the same or different host? ... for the telnet client to talk to. ... If you read the Telnet RFC, you will see that the telnet options ... Connection closed by foreign host. ...
    (comp.arch.embedded)
  • Re: Possibly OT: sending email from shell scripts on cygwin
    ... $ telnet your-smtp-server 25 ... With the outgoing SMTP server I have configured for Thunderbird (smtp.comcast.net using port 587) I get this for the 3 ports we've seen mentioned in this thread: ... Connecting To smtp.comcast.net...Could not open connection to the host, ...
    (comp.unix.shell)
  • Re: rlogin
    ... We have only 1 host system. ... Remote login made via telnet is insecure and has no protection, ... > recommended them to have a SSH connection, ... > telnet session of the terminal emulation software can still access the ...
    (comp.unix.aix)
  • [Info-ingres] Re: IIR3 and vnodes
    ... Also I've confirmed the host is listening on the 'II' installation with tcp_ip. ... If I change to using an installation password the connection succeeds. ... I cant telnet to the host, but I can scp to it. ... brat.ingres> telnet localhost ...
    (comp.databases.ingres)