Fixing SSH?

Discussion in 'macOS' started by Ed91, Feb 16, 2009.

  1. Ed91 macrumors 6502

    Joined:
    Dec 22, 2007
    #1
    Hi, I've never really had to use SSH much from my laptop, but I had the need for it yesterday, and I'm pretty sure that I found out it isn't working on my macbook pro.

    Any time I try to connect to any server, I get the following response from the terminal:

    Error opening 22: No such file or directory
    ssh_exchange_identification: Connection closed by remote host

    I have no idea what to do about this or why it's happening, but I can connect from my other mac on the same network. I have my firewall on, but this happens regardless..

    Any help/ideas/advise on how to sort this out or even as to what may be causing it would be greatly appreciated!

    Thanks, Ed
     
  2. Cromulent macrumors 603

    Cromulent

    Joined:
    Oct 2, 2006
    Location:
    The Land of Hope and Glory
    #2
    What is the command you are using to connect? Hide the server information / IP if you want with x's

    The correct command should be:

    ssh username@server
     
  3. Ed91 thread starter macrumors 6502

    Joined:
    Dec 22, 2007
    #3
    Yep, that's what I'm entering..

    ssh ed@**.**.***.***


    My other machine connects, but this one will not connect to anything; I just get that silly message.. I assume the 22 it's on about is something regarding the port. I don't know.. [shrug]

    Thanks for the reply :)

    [Edit] - Problem solved.

    I had some crazy looking files inside ~/.ssh so I deleted them, and suddenly all is good again in the world :)
     

Share This Page