Last active
July 10, 2018 16:00
-
-
Save kght6123/1355c75b8906d9c8778f288f7d8c7f2a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ sudo vi /etc/hostname # raspberrypi から 任意のホスト名に変更 | |
$ sudo vi /etc/hosts # raspberrypi から 任意のホスト名に変更 | |
$ sudo reboot # 再起動 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 必要モジュールのインストール | |
$ sudo apt-get install git make g++ | |
$ sudo apt-get install libavahi-compat-libdnssd-dev | |
$ sudo apt-get install avahi-daemon avahi-discover libnss-mdns | |
# avahiのインストール | |
$ sudo service dbus start | |
$ sudo service avahi-daemon start |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 初期のraspberrypiホスト名のIPを検索 | |
% dns-sd -q raspberrypi.local | |
DATE: ---Sat 16 Jun 2018--- | |
15:19:44.773 ...STARTING... | |
Timestamp A/R Flags if Name Type Class Rdata | |
15:19:44.940 Add 2 12 raspberrypi.local. Addr IN 192.168.10.106 | |
% rm ~/.ssh/known_hosts # 過去の認証ファイルを削除(稀に問題が出る) | |
# とりあえず、検索したIPまたはホスト名でログイン | |
% ssh pi@192.168.10.106 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% hostname # 事前にMacのホスト名を調べる | |
macbook.local | |
# 他の端末からMacへSSH | |
$ ssh kght@macbook.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% ssh pi@pi3j.local # 末尾に.localをつける |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment