The PSFTP command is used to create an interactive or batch session with a remote target and perform secure file transfer.
Examples
- Start an interactive session with a remote host and transfer a file ‘unwind.c’ to the disk/filespace accessed as ‘B’ on the CMS system. Perform standard ASCII/EBCDIC conversion:
psftp -i ecdsa.ppk neale@example
Using username "neale".
Remote working directory is /home/neale
psftp>
pwd
Remote directory is /home/neale
psftp>
ascii
Transfer in ASCII mode
psftp>
get unwind.c unwind.c.b
remote:/home/neale/unwind.c => local:unwind.c.b
psftp>
exit
Ready;
- Using a file ‘PSFTP BATCH’ containing a batch of commands for PSFTP
PSFTP BATCH A1 F 80 Trunc=80 Size=4 Line=1 Col=1 Alt=0
====>
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7..
pwd
ascii
get unwind.c unwind.c.b
exit
* * * End of File * * *
Connect using a private key to a remote target:
psftp -i ecdsa.ppk -b psftp.batch neale@example
Using username "neale".
Remote working directory is /home/neale
Remote directory is /home/neale
Transfer in ASCII mode
remote:/home/neale/unwind.c => local:unwind.c.b
Ready(00002);