sftp-server connection from windows7 to linux machine
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
See basically What i m doing here i want to transfer some data to linux server so. So i have written one .bat file which zip the content and then it will send to linux server using a SFTP.
i will paste here sample output of batch file.
Code:
Daily Test01 Backup
Starting backup. Creating ZIP file...
ZIP file created OK. Now uploading file...
psftp -batch -v -pw notused -b "Daily Test01 Backup_tempcommands.sftp" -bc -be -l root -P 22 -i "E:\00ISAC\03Projects\Client\Carwale\Code\zipcode\carwaleec2.ppk" 23.23.84.118
Looking up host "23.23.84.118"
Connecting to 23.23.84.118 port 22
Server version: SSH-2.0-OpenSSH_4.3
Using SSH protocol version 2
We claim version: SSH-2.0-PuTTY_Release_0.62
Doing Diffie-Hellman group exchange
Doing Diffie-Hellman key exchange with hash SHA-1
Host key fingerprint is:
ssh-rsa 2048 be:8b:4e:ff:8c:27:e0:ca:8a:7c:73:05:a4:f8:51:28
Initialised AES-256 SDCTR client->server encryption
Initialised HMAC-SHA1 client->server MAC algorithm
Initialised AES-256 SDCTR server->client encryption
Initialised HMAC-SHA1 server->client MAC algorithm
Reading private key file "E:\00ISAC\03Projects\Client\Carwale\Code\zipcode\carwaleec2.ppk"
Using username "root".
Offered public key
Offer of public key accepted
Authenticating with public key "imported-openssh-key"
Sent public key signature
Access granted
Opened channel for session
Primary command failed; attempting fallback
Started a shell/command
Server sent command exit status 127
bash: line 2: exec: sftp-server: not found
Disconnected: All channels closed
Connected to 23.23.84.118
Fatal: unable to initialise SFTP: could not connect
File upload FAILED!!!
File upload process complete. Deleting temporary files...
Completed backup process.
Yes i got answer for this. i was adding Subsystem sftp /usr/libexec/openssh/sftp-server this to ssh_config but when i added this to sshd_config file and i restarted sshd then it started working for me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.