>Synopsis: sftp URI destination can't handle IPv6 addresses
>Category: system amd64
>Environment:
System : OpenBSD 6.8
Details : OpenBSD 6.8-current (GENERIC) #173: Mon Nov 16
22:16:04 MST 2020
[email protected]:
/usr/src/sys/arch/amd64/compile/GENERIC
Architecture: OpenBSD.amd64
Machine : amd64
>Description:
sftp(1) won't work if destination is written in URI format:
sftp://[user@]host[:port][/path]
and host is an IPv6 address, enclosed in square brackets.
>How-To-Repeat:
# sftp sftp://user@[::1]:2222/
usage: sftp [-46AaCfNpqrv] [-B buffer_size] [-b batchfile] [-c cipher]
[-D sftp_server_path] [-F ssh_config] [-i identity_file]
[-J destination] [-l limit] [-o ssh_option] [-P port]
[-R num_requests] [-S program] [-s subsystem | sftp_server]
destination
# sftp -P 2222 user@[::1]/
works as expected.
>Fix:
Unknown.