Lunski's Clutter

This is a place to put my clutters, no matter you like it or not, welcome here.

0%

Avahi

建立本地DNS

好處

  • ip更動不用改連線設定
  • 使用主機名稱

安裝

1
2
3
sudo apt update
sudo apt install avahi-daemon
sudo systemctl enable --now avahi-daemon

設定

1
2
3
4
5
6
7
8
sudo vim /etc/samba/smb.conf

[global]
server string = DietPi NAS
workgroup = WORKGROUP

sudo systemctl restart smbd
systemctl status avahi-daemon

同網域下測試

1
2
3
4
5
6
7
ping dietpi.local

PING dietpi.local (192.168.0.100): 56 data bytes
64 bytes from 192.168.0.100: icmp_seq=0 ttl=64 time=1.617 ms
64 bytes from 192.168.0.100: icmp_seq=1 ttl=64 time=1.999 ms
64 bytes from 192.168.0.100: icmp_seq=2 ttl=64 time=1.968 ms
64 bytes from 192.168.0.100: icmp_seq=3 ttl=64 time=8.397 ms

添加ssh

1
2
ssh -o StrictHostKeyChecking=accept-new root@dietpi.local
ssh root@dietpi.local

如果你覺得這篇文章很棒,請你不吝點讚 (゚∀゚)

Welcome to my other publishing channels