scp connection refused error
I am trying to transfer a file from linux server to macosx machine using scp.
scp test username@68.120.23.91:~/
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.
24 Answers
Connection refused, if not the firewall, often indicates that the ssh service is not running on the remote computer.
Running
ps -aux | grep sshdon the remote computer will verify if it's running or not - IF you can somehow access that remote box.
2On 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.
Try installing openssh-client and openssh-server on your target computer if Linux. Otherwise the suitable ssh server for your Operating System.
If your ssh connection uses a specific port, set it for scp as well with
scp -P 1234 <other params>