Benches macOS

16

error making an ssh tunnel

apple Verified

Imported from the Apple Support Forums via the Wayback Machine 🔗

I'm getting an error trying to create an ssh tunnel.

*ssh –L 10548:localhost:548 [email protected]*

returns

*ssh: Error resolving hostname 342200223L: nodename nor servname provided, or not known*

normal ssh works ok so the problem is with localhost. This only happens on one of my computers. the other one connects fine using the same internet connection.

P.S. I just checked and this only happens on one user account. the rest are fine.

Message was edited by: V.K.

this thread is the continuation of [this one|http://discussions.apple.com/thread.jspa?messageID=7218912#7218912].

Message was edited by: V.K.

16 replies

Sign in or join Beachball Help to reply.

  1. 0

    deh2k

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Very strange. I wonder what 342200223L means. You can create a tunnel to the same [email protected] from another account on the same client Mac?

    The localhost parameter is actually sent to the server, i.e. it means that sshd should connect port 548 on localhost. What if you put "10548:localhost:548" in quotes? Or try "*ssh –L 10548:my.computer.at.work:548 [email protected]*". You could also try moving or renaming your local ~/.ssh folder to make sure there are no local user settings that are confusing things.

  2. 0

    Tim Haigh

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    try deleting your ~/.ssh/known_hosts file.

    then try the command again the very verbose flags

    ssh -vvv –L 10548:localhost:548 [email protected]

    see if any errors come up.

  3. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    tried that. same result. here is the error output:

    OpenSSH_4.7p1, OpenSSL 0.9.7l 28 Sep 2006

    debug1: Reading configuration data /etc/ssh_config

    debug2: ssh_connect: needpriv 0

    ssh: Error resolving hostname 342200223L: nodename nor servname provided, or not known

  4. 0

    deh2k

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    You have the problem with just one account on one Mac? And "ssh [email protected]" works from that account?

  5. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    yes to both.

  6. 0

    deh2k

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Very strange. I wonder what 342200223L means. You can create a tunnel to the same [email protected] from another account on the same client Mac?

    The localhost parameter is actually sent to the server, i.e. it means that sshd should connect port 548 on localhost. What if you put "10548:localhost:548" in quotes? Or try "*ssh –L 10548:my.computer.at.work:548 [email protected]*". You could also try moving or renaming your local ~/.ssh folder to make sure there are no local user settings that are confusing things.

  7. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    ok, I'll try your suggestions. Thanks. yes, it's quite puzzling why it works on one account and not on the other. Unfortunately, the account it doesn't work on is my primary account and i sure would hate to change it just because of this.

  8. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    tried all of these and nothing worked. i also tried ssh -L to a different computer at work and that produced the same error. as before it works fine when i do it from another account.

  9. 0

    BobHarris

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    Just for fun, try replacing 'localhost' with 127.0.0.1

    A few years ago I ran into a problem with 'localhost' being associated with IPv6 which, at that time, gave the version of ssh I was using some problems, and 127.0.0.1 is IPv4. This has most likely be resolved, but as an experiment making this substituion can't hurt.

  10. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    just tried it and it gives the same exact error.

    Someone on another board suggested that I could be using different versions of ssh on different accounts. Don't know how that can be or how to check it...

    Message was edited by: V.K.

  11. 0

    deh2k

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    V.K. wrote:

    Someone on another board suggested that I could be using different versions of ssh on different accounts. Don't know how that can be or how to check it...

    It could be. *ssh -V* will print the version number. You can also type *which ssh* to get the patch of the ssh that the account is using.

  12. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    tried that. no dice. both are exactly the same. the shells are the same too so it's something else.

  13. 0

    deh2k

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I wonder if it could be a permission problem. What does the command *nc -l 10548* do? That will just listen on the 10548 port. If it just sits there, it's working as it should and you can press ctrl-C to exit.

  14. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    it just sits there.

  15. 0

    deh2k

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    I did a little surfing and I think that 342200223 represents some Unicode character. Not sure which. Do you use any non-ASCII characters to describe your account?

  16. 0

    V.K.

    Imported from the Apple Support Forums via the Wayback Machine 🔗

    not that I'm aware of. Just my first and last names.