16

I've been having difficulty with connecting to my IPv6 address via rsync. Because the argument for the destination folder is colon-separated, the IPv6 address disrupts this like so:

root@fdff::ffff:ffff:ffff:/path/to/dest

How do I use rsync with an IPv6 address via SSH?

Daniel Li
  • 915
  • 2
  • 11
  • 23
Colene Lafever
  • 171
  • 1
  • 1
  • 6

3 Answers3

25

You'll want to wrap the address in brackets like so:

rsync -rtlzv -e ssh /path/to/src 'root@[fdff::ffff:ffff:ffff]':/path/to/dest
kasperd
  • 30,455
  • 17
  • 76
  • 124
Daniel Li
  • 915
  • 2
  • 11
  • 23
  • Note this doesn't work when using OpenSSH directly, the feature request was rejected https://bugzilla.mindrot.org/show_bug.cgi?id=1602 – MarcH May 15 '20 at 22:59
15

Try placing the IPv6 address in brackets, like this:

root@[2001:db8:1234:5678:feed:face:dead:beef]:/path
Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
6

I've run into the same issue and found out that the accepted answer did not work with my version of rsync (2.6.9) when using user@ as prefix

As a workaround you can use the -l user option of ssh:

rsync -e 'ssh -l root' /path/to/src '[fdff::ffff:ffff:ffff]:/path/to/dest'
Romuald Brunet
  • 181
  • 1
  • 4