additionally, I ’ ve tried to implement the reversion – Linux calculator besides becoming a customer and the OS X calculator besides becoming a horde. But attempting to ssh from Linux client to OS X host results in
ssh_exchange_identification: Connection closed by remote host
This happens regardless of whether the Mac firewall is turned on or off .
I ’ ve hear numerous solutions suggested by google searches, including at :
record link description hera insert radio link description here
( The system did n’t allow me to post any more links. )
I ’ megabyte reasonably sure that file ownerships, permissions, configurations are compensate .
The lapp port, say 1234, is configured for ssh on each calculator as both host and node ; netstat commands from both computers indicate that port 1234 is listened to. Neither DenyHosts nor fail2ban is installed .
On the Linux node, /var/log/auth.log doesn ’ thymine give any relevant messages .
Telneting from client to host gives
Connection closed by foreign host.
On the OS X host, at the time of an attempted ssh association :
MacBook.local socketfilterfw )
MacBook.local com.apple.preference.security.remoteservice: nsc_smb XPC: handle_event error : < Connection invalid >
It seems that the problem resides with the OS X horde and that the cardinal to solving it could be in these messages, but I ’ ve been ineffective to find utilitarian information .
On the MacBook, System Preferences > Security & Privacy > Firewall > Firewall Options, “ Remote Login ( SSH ) ” and “ sshd-keygen-wrapper ” are set to “ Allow incoming connections ”.
“ Remote Login ” is enabled in System Preferences > Sharing .
What could be causing the ssh association trouble and how to solve it ?
Additional Information Since Initial Post
Thanks for the replies, but I had already done everything outlined in the links, had Remote Login on with my user name ( alex ) as a exploiter, and restarted ssh on both computers after every change concerning ssh followed by rebooting both computers. Have besides reinstalled ssh respective times on the Linux calculator, and generated newly keys several times on both computers .
possibly I should have clarified that in ssh_config for both clients
PasswordAuthentication no PubkeyAuthentication yes
here is the request end product from the OS X horde : ( not certain how useful it is because I had changed the ssh port from the default 22, to say 1234 )
MacBook:~ alex$ ssh -vvv localhost OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug2: ssh_connect: needpriv 0 debug1: Connecting to localhost [::1] port 22. debug1: connect to address ::1 port 22: Connection refused debug1: Connecting to localhost [127.0.0.1] port 22. debug1: connect to address 127.0.0.1 port 22: Connection refused debug1: Connecting to localhost [fe80::1%lo0] port 22. debug1: connect to address fe80::1%lo0 port 22: Connection refused ssh: connect to host localhost port 22: Connection refused
Additional clarifying information :
MacBook:~ alex$ ssh -vvv -p 1234 localhost OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011 debug2: ssh_connect: needpriv 0 debug1: Connecting to localhost [::1] port 1234. debug1: connect to address ::1 port 1234: Connection refused debug1: Connecting to localhost [127.0.0.1] port 1234. debug1: Connection established. debug3: Incorrect RSA1 identifier debug3: Could not load "/Users/alex/.ssh/id_rsa" as a RSA1 public key debug1: identity file /Users/alex/.ssh/id_rsa type 1 debug1: identity file /Users/alex/.ssh/id_rsa-cert type -1 debug1: identity file /Users/alex/.ssh/id_dsa type -1 debug1: identity file /Users/alex/.ssh/id_dsa-cert type -1 debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_6.2 ssh_exchange_identification: Connection closed by remote host MacBook:~ alex$
Requested output from the Linux customer :
alex@desktop:~$ ssh -v alex@MacBook.local OpenSSH_6.0p1 Debian-4+deb7u2, OpenSSL 1.0.1e 11 Feb 2013 debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 20: Applying options for * debug1: /etc/ssh/ssh_config line 102: Applying options for * debug1: Connecting to MacBook.local [192.168.0.3] port 1234. debug1: Connection established. debug1: identity file /home/alex/.ssh/id_rsa type 1 debug1: Checking blacklist file /usr/share/ssh/blacklist.RSA-2048 debug1: Checking blacklist file /etc/ssh/blacklist.RSA-2048 debug1: identity file /home/alex/.ssh/id_rsa-cert type -1 ssh_exchange_identification: Connection closed by remote host alex@desktop:~$
After going to a lot of feat to get ssh working with Linux as host and OS X as customer, I figured that doing the change by reversal would be relatively simpleton. Maybe it is, but not so far ! far help would be a lot appreciated .
MacBook:~ alex$ sudo sshd -t Password: /etc/sshd_config: No such file or directory MacBook:~ alex$
The sshd_config file is in /private/etc/ssh, as is ssh_config and the ssh_host key files .
I placed a copy of sshd_config into /private/etc and did
sudo sshd -t. The output gave format errors suggesting style errors with a citation to rtf. The baptismal font was Times. I had copied the file from the Linux computer and in the march the baptismal font changed from plain textbook .
I changed the sshd_config file in /private/etc/ssh to plain textbook, toggled “ Remote Login ” in System Preferences > Sharing on the Mac, issued the ssh command from the Linux node, and was able to connect to the OS X host for the first time .
I had n’t come across the
sshd -t instruction before, so thank Lars for bringing it to my attention and pointing me in the right direction. The solution was indeed simple, but identifying it was n’t .