• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

pscp – ssh_init: Network error: Cannot assign requested address

by admin

The PuTTY suite includes two programs for copying your files securely between machines. PSCP is a noninteractive program much like scp, and PSFTP is an interactive program inspired by ftp. You can use pscp (secure copy) and psftp (secure FTP) at the Windows XP Command Prompt. To copy a file with pscp, use:

pscp username @ host:path"

For example:

pscp file.txt geek@www.example.com:MyDocuments/.

I was playing around with pscp and encounted with an error:

ssh_init: Network error: Cannot assign requested address

1. It looks like pscp is using port 0 by default and mentioning the port allowed copying the file.

C:\temp>pscp myfie.txt oracle@10.10.10.11:/home/test/
ssh_init: Network error: Cannot assign requested address

2. So I tries to provide the port number on the command line with “-P” option:

C:\temp>pscp -P 22 myfie.txt oracle@10.10.10.11:/home/test/
The server's host key is not cached in the registry. You
have no guarantee that the server is the computer you
think it is.
The server's ssh-ed25519 key fingerprint is:
ssh-ed25519 255 45:35:11:23:5d:10:e2:e3:60:6a:c9:06:bb:74:ad:34
If you trust this host, enter "y" to add the key to
PuTTY's cache and carry on connecting.
If you want to carry on connecting just once, without
adding the key to the cache, enter "n".
If you do not trust this host, press Return to abandon the
connection.
Store key in cache? (y/n) yes
oracle@10.10.10.11's password:
myfie.txt                 | 0 kB |   0.0 kB/s | ETA: 00:00:00 | 100%
C:\temp>

It worked.

Conclusion

If you are going to copy files from Linux “down” to your Windows system, you need a program that will run on Windows. The creator of PuTTY made PSCP.EXE for precisely that purpose: to implement scp for Windows.

Filed Under: Linux

Some more articles you might also be interested in …

  1. Troubleshooting slow network communication or Connection Timeouts in Linux
  2. CentOS / RHEL : How To Shrink LVM Root File System
  3. gmssl Command Examples
  4. pkginfo: command not found
  5. addr2line Command Examples in Linux
  6. How to Run SCP Without Password Prompt Interruption in Linux
  7. Most commonly performed operations in Yocto
  8. “az group” Command Examples (Manage resource groups and template deployments)
  9. runuser: command not found
  10. How to mount an iso file in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright