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 site (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
. You should also always explicitly specify a protocol (sftp
, ftp
or scp
, the ftps
protocol is FTP over SSL/TLS).1 Most URL’s will include also username
. 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 surrounded by 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:mypassword@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
- Protocol is
sftp
by default, but the default can be changed.Back
Advertisement