This is an old revision of the document!

Session URL

On command-line and in parameter of scripting command open, you can, in addition to using stored session name, specify an ad-hoc session using URL.

The syntax is:

[ sftp|ftp|ftps|scp :// ][ <username> [ : <password> ] @ ] <host> [ : <port> ]

Advertisement

The only mandatory part is host. Most URL’s will include also username and protocol (sftp, ftp or scp). Note that sftp protocol is the default one, but the default can be changed. The ftps protocol is FTP over SSL/TLS. The port needs to be specified only, when it differs from the default port for the protocol (22 for sftp/scp, 21 for ftp and 990 for ftps).

The host can either be a host name (such as example.com), an IPv4 address (such as 127.0.0.1) or an IPv6 address enclosed in square brackets (such as [2001:db8:85a3:8d3:1319:8a2e:370:7348]).

Special characters (like @ in username, see example below) have to be encoded using %XX syntax, where XX is hexadecimal ASCII code.

Common special characters are:

  • space: %20 or +
  • %: %25 (percent sign)
  • +: %2B (plus sign)
  • /: %2F (slash)
  • @: %40 (at sign)

Examples:

sftp://martin@example.com
martin%40example.com:4pRte!ai%253@example.com
sftp://root@example.com:2222
example.com
ftp://127.0.0.1:2121
ftp://[2001:db8:85a3:8d3:1319:8a2e:370:7348]:2121

Advertisement

Last modified: by martin