Command reference
linscp-cli command-line switches
Options you can pass to linscp-cli when you start it.
Run linscp-cli on its own to get an interactive linscp> prompt, or pass
switches to run commands without typing them. Every switch starts with a
slash, for example /script=/home/alice/upload.txt. You can put a session
before the switches: either the name of a site saved in the Site Manager or
a session URL such as sftp://alice@example.com/. See
Scripting with linscp-cli for complete
examples.
| Switch | What it does |
|---|---|
/privatekey=<file> |
SSH private key to authenticate with when connecting to the session given on the command line. |
/hostkey=<fingerprint> |
Fingerprint the server’s SSH host key must have; the connection is refused if it differs. |
/username=<user> |
User name to log in with, used instead of one in the site or URL. |
/password=<password> |
Password to log in with. Other users of the machine may see it in the process list, so prefer /passwordsfromfiles. |
/passwordsfromfiles |
Treat the values of the password and passphrase switches as names of files that hold the secret. |
/clientcert=<file> |
TLS client certificate file, for FTPS and WebDAV servers that ask for one. |
/certificate=<fingerprint> |
Fingerprint the server’s TLS certificate must have, for FTPS and WebDAVS. |
/passphrase=<passphrase> |
Passphrase that unlocks an encrypted private key or client certificate. |
/passive[=<on/off>] |
Turn FTP passive mode on (the default) or, with =off, use active mode. |
/implicit |
Use implicit TLS for FTP, usually on port 990. |
/explicit |
Use explicit TLS for FTP, upgrading the plain connection with AUTH TLS. |
/timeout=<seconds> |
How many seconds to wait for a server reply before giving up. |
/rawsettings <name>=<value>... |
Set any site setting by its raw name, as stored in the configuration file. See raw configuration. |
/script=<file> |
Run the commands in a text file. If the file does not end with exit, the prompt stays open afterwards. |
/command <command>... |
Run each following argument as one command. Quote every command that contains spaces. |
/parameter // <value>... |
Pass values to the script, where %1%, %2% and so on stand for them. The // ends the list of switches. |
/stdout[=binary/chunked] |
Let get write a file to standard output when you give - as the target. Progress and messages then go to standard error. |
/stdin[=binary] |
Let put read file content from standard input when you give - as the source. |
/log=<file> |
Write a session log to this file. |
/loglevel=<level> |
How much detail the log holds, from 0 to 2. A trailing * also records passwords, so keep such logs private. |
/logsize=[<count>*]<size> |
Start a new log file when the current one reaches the size (such as 10M), keeping at most the given number of old files. |
/xmllog=<file> |
Write an XML log of each operation and its result to this file, for other programs to read. |
/xmlgroups |
Wrap the XML log entries of each command in one group element. |
/nointeractiveinput |
Cancel any prompt instead of waiting for keyboard input. Use it in cron jobs and pipelines. |
/ini=<file> |
Read and save settings in this file instead of ~/.config/linscp/WinSCP.ini. With nul, start from defaults and save nothing. |
/rawconfig <name>=<value>... |
Set any application setting by its raw name. linscp-cli saves its configuration when it exits, so the value stays. |
/batchsettings <site-mask> <name>=<value>... |
Change raw settings on every saved site whose name matches the mask, then save the sites. Prints which sites changed. |
/copyid /identity=<key-file> <site> |
Add the public half of a key to ~/.ssh/authorized_keys on the server, like ssh-copy-id. Needs /identity and a site. |
/identity=<key-file> |
With /copyid, the key file whose public key gets installed. -i works too, as with ssh-copy-id. |
/fingerprintscan <site> |
Connect to an SSH or FTPS server only long enough to print its host key or certificate fingerprints (SHA-256, SHA-1, MD5), without checking them. Compare the result with a value you trust before you rely on it. |
/info |
Print the SSH and TLS libraries linscp uses and the ciphers, key exchanges, host key types and MACs they offer, then exit. |
/help |
Show a short usage summary and exit. |