kazeopeia kazeopeia - 1 year ago 154
Linux Question

Use PSFTP on Linux

I am using Linux Suse 10 and I am a complete noob when it comes to using it that's why I really needed some help.

The scenario is simple. I need to transfer some files from my linux server to a windows pc.

I already did this using FTP commands written inside a .scr file. Here's the content of my Upload.scr :

ftp -n 10.*.*.* <<SCRIPT
user administrator drowssap
lcd /path/of/the/txt/file/
put TESTUpload.txt

And then I would call it from linux Konsole using :
bash Upload.scr

It was actually working and could successfully transfer files to my windows pc. However, what I need is to transfer the files using "psftp".

The original code which works from windows-to-windows transfer is :

ProcessStartInfo PSI = new ProcessStartInfo("CMD.exe", "/C psftp " + UserName + "@" + IP + " -pw " + Password + " -b UpLoad.scr");

I needed to do the same to my linux-to-windows transfer (i.e. I needed to use psftp instead of just ftp or sftp).

Whenever I tried to type "psftp" on linux Konsole it would display the ff :
bash: psftp: command not found

I know there's something missing. What should I do first to make it work? Should I install some application or .exe file into my linux server?

I really need help.
Thank you very much in advance! :)

Mat Mat
Answer Source

psftp is PuTTY's SFTP utility.

OpenSSH has one too, named simply sftp (without the p). It is very likely already installed on your Linux machine. You just need to run below command to install psftp as putty utility. apt-get install putty-tools

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download