ssh_init: Network error: Cannot assign requested address

Viewed 80351

I am trying to set up a connection and transfer files using putty on a windows 10 platform. I have verified that the default port in putty is 22. When I run the command in the command line to connect and transfer files though I get the above error. Any idea why this is or what I should do?

5 Answers

Did you try:

pscp -P 22 c:\documents\foo.txt user@example.com:/tmp/foo

I had to go into the Putty Default Settings and "Save" them again, despite port 22 showing as the default. Worked for me to avoid adding the -P 22 option every time.

I had the same error and ended up at this page. The -P 22 did not solve my problem.

I use Putty saved sessions and double checked my command line and had the same error as the OP.

I was using:

pscp -l SESSION_NAME_IN_PUTTY ip:/remote_path local_path

I reviewed the command line options for pscp and changed the -l to -load and it worked.

The final command looked like:

pscp -load SESSION_NAME_IN_PUTTY ip:/remote_path local_path

Note: If you still have the error, please review your spelling of SESSION_NAME_IN_PUTTY and ensure it is an exact match. One letter off, can cause the same error.

In my case I had created a shortened "session name" in Putty -- that is, a shorter representation of the full hostname. This worked for most Putty functions -- but when I tried to use pscp I found that I needed to have a session name that was identical to the hostname.

I'm my case I was hitting this error because SSH was not enabled in Raspbian.

Related