LoginSignup
1
0

More than 5 years have passed since last update.

【Raspberry Pi】Raspbianインストール時にVNCとSSHを有効にする方法【Mac】

Last updated at Posted at 2018-11-15

Raspberry PiでRaspbianを何回も再インストールしていて、その度に調べるのが面倒になったので自分の方法をまとめます。

まず、公式サイトからNoobsをダウンロードして、解凍。

フォルダ内にある"recovery.cmdline"というファイルをエディターで開いて

quiet

の部分を

vncinstall

と書き換えて保存。

次に、osフォルダ内にあるRaspbianのフォルダを開いて、"partition_setup.sh"というファイルをエディターで開く。

最終行付近の

unmount /tmp/1

の直前に

echo "ssh" >/tmp/1/ssh

と書き加え、保存する。

ここまで出来たらMicroSDカードを安全に取り外して、RaspberryPiに挿入する。

RaspberryPiを電源に接続し、Mac側でターミナルを開いてRaspberryPiのIPアドレスを特定する。

VNCビューアーを開いて、RaspberryPiのIPアドレスを入力し、
ユーザー名にpi
パスワードにraspberry
と入力して接続する。

ssh接続は

sudo ssh pi@~~

~~の部分はRaspberryPiのIPアドレスを入力すればよい。

以上でVNC接続・SSH接続の手順が完了。

1
0
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0