scp connection refused error

I am trying to transfer a file from linux server to macosx machine using scp.

scp test [email protected]:~/

it shows error

ssh: connect to host 68.120.23.91 port 22: Connection refused lost connection.

I checked firewall settings on mac it allows all connections from all machine. Please help me asap.

Let me know if you need any other information.


Connection refused, if not the firewall, often indicates that the ssh service is not running on the remote computer.

Running

ps -aux | grep sshd

on the remote computer will verify if it's running or not - IF you can somehow access that remote box.


On the Mac, go to System Preferences > Sharing and make sure Remote Login is enabled (checked).

Also, shouldn't you have escaped the ~ in that scp command? Otherwise I'm afraid your local (Linux) shell will swallow it and replace it with the path to your Linux account's home directory.