osync icon indicating copy to clipboard operation
osync copied to clipboard

SSH via IPv6 or IPv4, make REMOTE_HOST filled by regex instead of bash substitution

Open romosh91 opened this issue 7 years ago • 4 comments

Is or will there be a possibility to use IPv6-addresses as TARGET_SYNC_DIR value?

Edit: Solved the problem by getting to know SSH-Aliases.

romosh91 avatar Oct 18 '18 14:10 romosh91

Would love to hear your solution, so I can add a note to the documentation.

deajan avatar Oct 18 '18 17:10 deajan

In the .ssh folder created after using the ssh-keygen -t-command, you can create a file named config. This file is used to create SSH-Aliases:

Host testhost
    HostName 1234:5678:9abc:def:1234:5678:9abc:def

After doing this, you are able to login to the mentioned IPv6-address by typing ssh user@testhost. This can also be used to reach an IPv6-address via your program: ssh://user@testhost//path/to/dir2.

romosh91 avatar Oct 19 '18 07:10 romosh91

Ahh, I see :) Thanks for the answer. I'll leave this open in order to think about putting a regex in place that can match an IPv4 or an IPv6.

deajan avatar Oct 19 '18 09:10 deajan

Thank you very much and keep up the good work! Your program is very easy to understand with the well written documentation. :)

romosh91 avatar Oct 19 '18 09:10 romosh91