You are not logged in.

#1 2022-08-25 22:26:29

mari-aria
Member
Registered: 2019-04-06
Posts: 4

IPv6 in autofs + sshfs (auto.ssh)

Hello Arch fellows

I'm currently into getting rid of IPv4 from my servers completely, save for my tunnel server.

I had a lot of trouble in writing a correct auto.ssh file containing IPv6 addresses. In the end, I got it to work. Because of the trouble making it work (and several dumb answers to people in the same situation as me like these https://unix.stackexchange.com/question … v6-client) I'd like to share the working solution with the Arch community.

Firstly:
In auto.ssh, the IPv6 address need to be bracketed [::]. Do not mess with any backslashes for the address in question, this is handled by a flag in the auto.master instead.

auto.ssh:
/mnt/d4        -fstype=fuse,rw,allow_other,IdentityFile=/root/.ssh/id_rsa,port=21 :sshfs\#d4@[fd01:db8:2023:1::20]\:

Secondly:
I've added --no-slashify-colons in auto.master, to remove the need of slashing every colon in the IPv6 address.
/-              /etc/autofs/auto.ssh    --timeout=4 --no-slashify-colons

Thirdly:
The most important thing was to login via ssh to the address in question to get rid of the "The authenticity of host x can't be established. Are you sure you want to continue connecting (yes/no)?" message. You don't need to proceed past writing yes to that question. Without that autofs will stop silently without throwing an error, not even in the logs - because the address is unknown. Remember to do it with the root user!

There are of course other solutions to the third step, like adding the servers to known_hosts, or turning off host check (not to be recommended).

Happy IPv6'ing with regards from,
Mari-Aria

Offline

#2 2022-08-26 00:52:53

schard
Forum Moderator
From: Hannover
Registered: 2016-05-06
Posts: 1,985
Website

Re: IPv6 in autofs + sshfs (auto.ssh)

Thanks for your contribution, but how-tos are better off in the Wiki.


macro_rules! yolo { { $($tokens:tt)* } => { unsafe { $($tokens)* } }; }

Offline

Board footer

Powered by FluxBB