can not connect to a remote SSH server with my mac

Ok have tried 4 different applications, fetch , captain ftp, terminal, etc.

I am trying and connect to a friends ssh server to upload some file logs. I have the correct login/password, have tried both protocol 1 and 2. Port 22 is correct. I keep getting the error message

User logging error - captain ftp

SFTP connection to ..... could not be opened becasue the connection to the SFTP server could not be established or was lost - Fetch

ssh exchangeidentification: Connection closed by remote host - Ternminal

We have tested it using Telnet and other programs on a PC and all is well.
When i try and connect he receives the message
Refused connect from cpe-"ip address"(ip address)
policy: HostKey/etc/ssh/ssh host_rsakey

Do i have a setting somewhere i am missing.

MacBook Pro, Mac OS X (10.5.7)

Posted on Jul 6, 2009 6:39 PM

Reply
2 replies

Jul 6, 2009 7:32 PM in response to Chiyo35

1st, is the server behind a home router? Has port 22 been "Port Forwarded" from the internet side to the server's side of the router?

2nd, from a Terminal session use the command:

ssh -v -v -v username@remote.server.address

The -v -v -v triplets will give you a wealth of ssh connection information. If you read through this carefully you may find the root cause of your problems (assuming the 1st step above doesn't yield results).

Another thing to consider, is that ssh will not make a connection to an account that it does not consider to be reasonably secure. This means that the home directory of the account and specific key subdirectories must have proper ownership and permissions, or ssh will not connect. The specific ownership and permissions needed and the files and directories checked are spelled out in the ssh man page

man ssh

Jul 6, 2009 10:32 PM in response to Chiyo35

policy: HostKey/etc/ssh/ssh host_rsakey


This sounds like the server has been set to accept public-key authenticated users only, not password-based accounts.

Therefore you'll need to upload your public key to the server in order to connect.

Of course, the challenge of installing your public key when you cannot log onto the server in the first place is a challenge that the world has yet to find a good answer for. In most cases, if you don't have other access to the server it requires passing your public key to the server admin and having him install it.

The file you're looking for is ~/.ssh/id_rsa.pub

Pass this file to the server admin. If he set it up to only support public-key access he should know what to do with it.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

can not connect to a remote SSH server with my mac

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.