Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

scp copy files from windows to linux

 
jing hu
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
  • 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.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • 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
  • 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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic