# psftp(user, password, server, port, commands)

Automates an SFTP session.

### Syntax

o_psftp(user, password, server, port, commands)
  user: Text - login name
  password: Text - user's password
  server: Text - IP address or server name
  port: Int - port to use
  commands: array Text - the exact commands to be executed
  A scalar Text - domain name or IP address
  return: array Text - registration information

### Usage

Automates an FTP session

### Location

menu: veeos ==> Network ==> psftp

library: netLib

### Example

`o_psftp("demo","password","test.rebex.net",22,["lcd c:\temp","get readme.txt", "bye"])` logs onto a server and downloads a readme file.

### Notes

The FTP protocol is unforgiving so the syntax of your command file must be precise. It is strongly advised to manually execute the FTP transactions and carefully record them before attempting to automate.

ALSO since this is using secure comm you most likely will need to accept an encryption key manually before anything else will work.

### Reference

### Dependencies

### Supported On

VEE 7.0+, all platforms

### See Also

longLat, currentTemp, currentHumidity, whois, wget

© 2015-2021. All Rights Reserved. Stan Bischof (stan@worldbadminton.com). Last updated 09 August 2021 18:25.