• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

scp copy files from windows to linux

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
windows is source machine.
I need copy files from windows to linux.
In windows I set up cygwin and ssh , and run" ssh-keygen -t rsa" to id_rsa.pub and id_rsa.
Then copy the file id_rsa.pub to linux ~/.ssh directory.(here I use wincp)
in the linux ~/.ssh directory I create authorized_keys file and type the command " cat id_rsa.pub >> authorized_keys"

Then in the linux machine, I run

it return the error :ssh: connect to host 9.123.*.*port 22: Connection refused

Can anybody tell me the answer or solution.
Thanks very much.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you want to run scp on the Linux box, then the ssh daemon (sshd) has to be running on the Windows box. It can be set up to run as a Windows service, which is a little messy but doable.
 
jing hu
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks, Ernest. your suggestion is very valuable. I have resolved my question according to your tip.
it just only need ssh-host-config and some chmod operations.
Thanks very much
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic