-1

What I have:
1. Linux server with user
2. Folder /home/user/MyApp/
3. Files in some folder structure at Windows station
4. I can connect to server through SSH with this user login

I need bat-file that:
1. Excecute some script on Linux server (find and kill processes)
2. Copy files from Windows station to Linux server to /home/user/MyApp saving all file structure
3. Reboot server

I found that Putty can connect and execute script, but cannot find easy way to copy files.

Cœur
  • 32,421
  • 21
  • 173
  • 232
dmitry
  • 396
  • 1
  • 3
  • 15
  • When you googled it, did you not find this: https://community.nxp.com/thread/220596 or this: https://stackoverflow.com/questions/21587036/using-putty-to-scp-from-windows-to-linux – Stuart Sep 08 '17 at 09:44

2 Answers2

2

You can use xshell. It contents lrzsz command

yum -y install lrzsz

or

apt-get install lrzsz

rz command is for upload

sz command is for download

Amit Joshi
  • 12,434
  • 18
  • 59
  • 118
sonice
  • 21
  • 1
1

pscp.exe from the PuTTY package can copy files to a remote location

PuTTY Secure Copy client
Release 0.65
Usage: pscp [options] [user@]host:source target
       pscp [options] source [source...] [user@]host:target
       pscp [options] -ls [user@]host:filespec
Options:
  -V        print version information and exit
  -pgpfp    print PGP key fingerprints and exit
  -p        preserve file attributes
  -q        quiet, don't show statistics
  -r        copy directories recursively
  -v        show verbose messages
  -load sessname  Load settings from saved session
  -P port   connect to specified port
  -l user   connect with specified username
  -pw passw login with specified password
  -1 -2     force use of particular SSH protocol version
  -4 -6     force use of IPv4 or IPv6
  -C        enable compression
  -i key    private key file for user authentication
  -noagent  disable use of Pageant
  -agent    enable use of Pageant
  -hostkey aa:bb:cc:...
            manually specify a host key (may be repeated)
  -batch    disable all interactive prompts
  -unsafe   allow server-side wildcards (DANGEROUS)
  -sftp     force use of SFTP protocol
  -scp      force use of SCP protocol
Thomas Munk
  • 563
  • 7
  • 21