Skip to content

Instantly share code, notes, and snippets.

@morizotter
Last active August 29, 2015 14:13
Show Gist options
  • Save morizotter/ee5b4c08a9d54cf24ca1 to your computer and use it in GitHub Desktop.
Save morizotter/ee5b4c08a9d54cf24ca1 to your computer and use it in GitHub Desktop.
Raspberry Pi開封から無線LAN経由でSSH接続して初期設定するまでのマイ・ウェイ(モニタ・キーボード無し) ref: http://qiita.com/morizotter/items/48ad0b17207b0dd66cac
$ diskutil list
Host raspi01.local
HostName raspi01.local
Port 22
User pi
Protocol 2
IdentityFile ~/.ssh/id_rsa
$ diskutil list
$ diskutil unmountDisk /dev/disk4
$ sudo apt-get update
$ sudo apt-get upgrade
$ sudo apt-get install vim
$ sudo update-alternatives --set editor /usr/bin/vim.tiny
$ sudo vi /etc/hostname
$ sudo vi /etc/hosts
$ sudo shutdown -r now
$ brew install ssh-copy-id
$ ssh-copy-id -i ~/.ssh/id_rsa.pub [email protected]
$ sudo apt-get install avahi-daemon
$ sudo apt-get install avahi-daemon
$ ping raspi01.local
PING raspi01.local (192.168.3.12) 56(84) bytes of data.
64 bytes from raspi01.local (192.168.3.12): icmp_req=1 ttl=64 time=0.183 ms
$ ping raspi01.local
PING raspi01.local (192.168.3.12): 56 data bytes
64 bytes from 192.168.3.12: icmp_seq=0 ttl=64 time=55.977 ms
$ sudo dd bs=1m if=2014-09-09-wheezy-raspbian.img of=/dev/disk4
3125+0 records in
3125+0 records out
3276800000 bytes transferred in 2817.832759 secs (1162880 bytes/sec)
$ ssh [email protected]
pi@raspberrypi ~ $
pi@raspberrypi ~ $ lsusb
Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0411:01a2 BUFFALO INC. (formerly MelCo., Inc.) WLI-UC-GNM Wireless LAN Adapter [Ralink RT8070]
pi@raspberrypi ~ $ wpa_passphrase [SSID] [PASSPHRASE]
network={
ssid="[SSID]"
#psk="[PASSPHRASE]"
psk=c505ed74c79f4723e9809c6e167461d588d1e40c20f802590514b95de6ddcb71
}
pi@raspberrypi ~ $ sudo sh -c "wpa_passphrase [SSID] [PASSPHRASE] >> /etc/wpa_supplicant/wpa_supplicant.conf"
pi@raspberrypi ~ $ sudo cat /etc/wpa_supplicant/wpa_supplicant.conf
network={
ssid="[SSID]"
#psk="[PASSPHRASE]"
psk=c505ed74c79f4723e9809c6e167461d588d1e40c20f802590514b95de6ddcb71
}
$ ssh [email protected]
pi@raspberrypi ~ $
pi@raspberrypi ~ $ raspi-config
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment