Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

(not sure if questions about SSH should go on SO or SF)

Running a Macbook with OS 10.5. SSH seems to be broken even checking the version gives me this error:

$ ssh -v /usr/bin/ssh: line 1: -----BEGIN: command not found /usr/bin/ssh: line 2: MIIEowIBAAKCAQEA66pW3MldpOnUWFX+3xLKF8WFKViMDbPC/A7c8hv69DeFgnM/: No such file or directory /usr/bin/ssh: line 3: EnjrFYA7590ltUzvVf1bVZTbUMGYWNFX/PUtI/7T0WFildqXlNRXnFfqX5y4wi6v: No such file or directory /usr/bin/ssh: line 4: B9EVKeCK+57zw26IBsMrAZx0zaBIE/l13HF1Vm39IldqAiJbjoxgrx6NJmHHwx6q: No such file or directory /usr/bin/ssh: line 5: AZIPf9vFSbTUT9Cn6gIg7E7oDhCGbt2x6UjvZvPs/WwLSxbti1OhAuEZ3jUhqujp: No such file or directory /usr/bin/ssh: line 6: gSdASpRlPai5C5vzIp+UzBjApeNyEIb+Sv/m20IiELhrQOeCNWMiflVudxzTeyoi: No such file or directory /usr/bin/ssh: line 7: wxRiwIqpnFZyvfgQRVRnw0ZPyR1PxGaufMhqhwIBIwKCAQEA5O6dhgVw6VgtXSBW: command not found /usr/bin/ssh: line 8: rNBsjB72Yq3J4WzMCsycHmRS3pxVzy4gA1DkXgeKprmSWFldhruajaaL6AyFXZgp: command not found /usr/bin/ssh: line 9: lqUHR4nVFIp9BpnVFDv9VgxCw0fJbC1ZkpCYN08n7R4RXsMlDeIpxw0DwG/Q/XX9: No such file or directory /usr/bin/ssh: line 10: dw8hhykEh8KhfmqE055PSwe8USnr/dBBsvmR0abqWWOEd1B822i7qqKdWAyzTDR9: No such file or directory /usr/bin/ssh: line 11: YAMBldFDQwCKtUTF6Mi0M8+FNJkJVkgWCK3Gwor2ZH2JzktXhnDc8lnK9PknPxxJ: command not found /usr/bin/ssh: line 12: TMrzjmGK6bGU65UlxeVNGsgDJm/yE1MvAk+kaSTK99ey5WxC5GRt20heJipXx9EA: No such file or directory /usr/bin/ssh: line 13: 2nBr+wKBgQD8PAvaaNptMqg7gCd0luOWIH2YxQt0MBJVsq/jLjGOe7o9Ac93akDu: No such file or directory /usr/bin/ssh: line 14: zMsOIHKptlC/ObI94azGwUo2AaiwhJ4wYHs1me+xkwGG5O3JI0B4v+RC5Uhe3LAf: No such file or directory /usr/bin/ssh: line 15: dr7fJXK+3L8LmrbEW3VX3EKpkxfrUnGxCiT0uVD4gUiZRgx2uZ1CuwKBgQDvLviq: command not found /usr/bin/ssh: line 16: FS8x10Py5gFITSlF9rbWBqsdMIe0ZjQCX8j9Z5b5zTojNUtvP9gVngnBYrBCPgqU: command not found /usr/bin/ssh: line 17: 8OW0dbsiiUKRQbAz8/t7wDYJcQ6dH1ZxOpQoF9tXs1dcgMN/oBoZnzLomHIScjRT: No such file or directory /usr/bin/ssh: line 18: qQHDhxqYgpUxJQBWm16nmSrYPqkf5V1rlwK4pQKBgQCBuHsf3icw2DlDK/cIwqDu: No such file or directory /usr/bin/ssh: line 19: H1aJFOFRslKSeSdBorpmiMYuAO5aq6xdjeTFb8Xw4WtbB7rAvTRI9bEjFsvIfrfB: command not found /usr/bin/ssh: line 20: G60UQInmS5pioZ7ceIeOjpKmD4ROCxi/uWl6E0JTh3gx2onhU5tvA4//cDgv4UHI: No such file or directory /usr/bin/ssh: line 21: w2N2izD01MZAMqdTAF+BZwKBgA2q6aNRquznur1sOpZqzyiRwU4PAnayUOW8soPK: command not found /usr/bin/ssh: line 22: 9YrSuCuIEfNiIZFUGvnrxgsM9CEK3AiCy0wj/BCaIQ+dWoagOkGV9HWRboyitHt/: No such file or directory /usr/bin/ssh: line 23: sLHVej+Gl0cdTP/6hSYJGNoXVvm9YhNovkWv8uQkuBFv1CI0w5SMaNkoJuvhOInO: No such file or directory /usr/bin/ssh: line 24: HWmjAoGBAOnPA2ZsVZmm6NESqXLzECbUQ2/47Xd8oLeX6iAxJKldUuiW8cRFzdkp: No such file or directory /usr/bin/ssh: line 25: 1SMS7qpVmx7SaRs3S1btSy4lUAdEZLp34GojDEFFNqxIH3Isvn9w+emS4txErspw: command not found /usr/bin/ssh: line 26: 7oaDyFeNSWOeZTd3EKQ4Txq6oMNJcM/gw3h+dNwaR6DA3r7BR53f: No such file or directory /usr/bin/ssh: line 27: -----END: command not found

It gives the same error for anything with ssh

how can I reload SSH?

Many thanks

share|improve this question
2  
If the key in question that you've copied over is your host key or a personal RSA/DSA key, you probably want to re-generate it now that you've put it on a public site. –  James F Jul 22 '09 at 21:33

2 Answers 2

up vote 4 down vote accepted

Your ssh config may be broken, but I doubt ssh itself is at fault. First question: Are you really running ssh? It almost looks like the shell is trying to execute a public key that's had its x bit set...

$ which ssh
$ file $(which ssh)

You should see something like this:

mojito:~ insyte$ which ssh
/usr/bin/ssh
mojito:~ insyte$ file $(which ssh)
/usr/bin/ssh: Mach-O universal binary with 2 architectures
/usr/bin/ssh (for architecture i386):   Mach-O executable i386
/usr/bin/ssh (for architecture ppc7400):        Mach-O executable ppc

If that all looks good, it's time to check out your config. Start be moving your $HOME/.ssh/ directory out of the way, like so:

$ mv ~/.ssh ~/.ssh.backup

Then re-try your ssh command. If it's still FUBAR, you'll need to check out your global config. Check out /etc/ssh*_config and make sure they're normal-looking plain text files.

share|improve this answer
1  
...a "mojito" sure sounds good right now ;) –  l0c0b0x Jul 22 '09 at 19:17
    
Yep. Somehow you've managed to copy a key over your ssh binary. –  Insyte Jul 22 '09 at 19:20
    
HOME$ which ssh /usr/bin/ssh HOME$ file $(which ssh) /usr/bin/ssh: ASCII text –  user13966 Jul 22 '09 at 19:21
    
Probably the easiest fix would be to just copy the "/usr/bin/ssh" executable from an identical version of OS X... –  Insyte Jul 22 '09 at 19:21
    
OK thanks very much –  user13966 Jul 22 '09 at 19:23

It looks like somehow your /usr/bin/ssh binary was overwritten by an SSL certificate file.

Restore your ssh binary from a backup, or reinstall the ssh program on your Mac.

share|improve this answer
1  
ding! We have a winner. –  Matt Simmons Jul 22 '09 at 19:56
1  
Time machine is a wonderful thing :) –  James Jul 22 '09 at 21:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.