- Install ifplugd and openssh on both machines.
- Optionally install inxi on both machines (recommended).
- Install rsync on master.
- Start
ifplugdservice on both machines. - Start
sshdservice on slave. - Plug in the ethernet cable from master to slave.
- SSH from master to slave.
pacman -S ifplugd inxi openssh rsync$ inxi -i
Network: Card-1: Your PCI Express Gigabit Ethernet Controller driver: r8169
IF: enp4s0f2 state: down mac: 30:02:06:bc:ab:14MASTER_INTERFACE=enp4s0f2
Ethernet interface name is traditionally eth0. On systemd machines,
the default differs. Find it by running inxi -i as above.
Alternatively, run ip addr and pick the second result. The name will
look similar to enp4s0f2.
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp4s0f2: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 30:02:06:bc:ab:14 brd ff:ff:ff:ff:ff:ffWith the ethernet interface name on master obtained, start the ifplugd
service:
systemctl start ifplugd@enp4s0f2
or
systemctl start ifplugd@${MASTER_INTERFACE}
pacman -S ifplugd inxi openssh$ inxi -i
Network: Card-1: Intel Gigabit Network Connection driver: e1000e
IF: enp0s25 state: down mac: 73:2c:4b:e8:7b:76SLAVE_INTERFACE=enp0s25
Alternatively, run ip addr and pick the second result. The name will
look similar to enp0s25.
$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 73:2c:4b:e8:7b:76 brd ff:ff:ff:ff:ff:ffWith the ethernet interface name on slave obtained, start the ifplugd
service:
systemctl start ifplugd@enp0s25
or
systemctl start ifplugd@${SLAVE_INTERFACE}
systemctl start sshd
Directly connect master and slave ethernet ports with cat cables (such as standard CAT5e).
Check to make sure both ends of the ethernet cable are plugged in all the way. Run this command on both master and slave:
ifplugstatus -v
Obtain the IPv6 address on slave ethernet interface:
ifconfig | grep inet6 | head -n 1 | awk '{print $2}'
Alternatively, use inxi:
$ inxi -ix
WAN IP: None Detected! IF: enp0s25 ip-v4: N/A ip-v6: fe80::6497:17de:fee3:1942In the inxi output, look for IF: (your ethernet interface name),
then copy the ip-v6 value.
SLAVE_IPV6=fe80::6497:17de:fee3:1942
example:
ssh user@fe80::6497:17de:fee3:1942%enp4s0f2or
SLAVE_USER_NAME=user
ssh ${SLAVE_USER_NAME}@${SLAVE_IPV6}%${MASTER_INTERFACE}example:
rsync \
--recursive \
--perms \
--human-readable \
--progress \
--verbose \
-e ssh \
/path/to/src \
user@[fe80::6497:17de:fee3:1942%enp4s0f2]:/path/to/destor
rsync \
--recursive \
--perms \
--human-readable \
--progress \
--verbose \
-e ssh \
/path/to/src \
${SLAVE_USER_NAME}@[${SLAVE_IPV6}%${MASTER_INTERFACE}]:/path/to/destPutting brackets around the slave IPv6 address is required.
worked perfectly! thanks!