์๋ ํ์ธ์.
ํ๋ก์ ํธ๋ฅผ ์ํด ๋ผ์ฆ๋ฒ ๋ฆฌํ์ด๋ฅผ ๊ฒ์ดํธ์จ์ด๋ก ์จ์ผ ํ๋ฏ๋ก, GUI ์๋ RaspberryPi OS LITE๋ฅผ ์ด์ฉํ๊ธฐ ์์ํ์ต๋๋ค.
SSH๋ ์๊ฒฉ ํธ์คํธ ์ปดํจํฐ๋ก ์ ์ํ๊ธฐ ์ํด ์ ์๋ ์ธํฐ๋ท ํ๋กํ ์ฝ๋ก ํฌํธ ๋ฒํธ๋ 22๋ฒ์ ์ฌ์ฉํฉ๋๋ค.
1. SD Card์ OS Image Flash
- Requirement
- Raspberry Pi OS ( Raspberry Pi OS Lite )
- belena etcher ( Flash OS images to SD cards & USB drives )
https://www.raspberrypi.org/software/operating-systems/#raspberry-pi-os-32-bit
Operating system images – Raspberry Pi
The Raspberry Pi is a tiny and affordable computer that you can use to learn programming through fun, practical projects. Join the global Raspberry Pi community.
www.raspberrypi.org
2. Flash Success ์ฑ๊ณต ์
- SSH enable -> ssh (ํ์ฅ์๋ช ์์ด ๋น ํ์ผ ์์ฑ)
- WiFi ์ฐ๊ฒฐ -> wpa_supplicant.conf (ํ์ผ ์์ฑ)
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
network={
ssid="wifi-Name"
psk="wifi-PW"
key_mgmt=WPA-PSK
}
์ฐธ๊ณ ๋ก 5GHz ๋์ 2.4GHz๋ฅผ ์ฐ๋๊ฑธ ์งํฅํจ.
3. Raspberry Pi์ SD์นด๋ ๋ฃ๊ณ ์ ์์ ์ธ๊ฐ ์
์ ๊ณผ์ ์ ์ ๋๋ก ํ๋ค๋ฉด, ๋ผ์ฆ๋ฒ ๋ฆฌํ์ด๊ฐ WiFi์ ์ฐ๊ฒฐ์ด ๋์์ ๊ฒ.
๊ณต์ ๊ธฐ ๊ด๋ฆฌ์ ๋ชจ๋์ ๋ค์ด๊ฐ ํ์ฌ ๋ผ์ฆ๋ฒ ๋ฆฌํ์ด๊ฐ Local IP๊ฐ ์ด๋ป๊ฒ ๋๋์ง ํ์ธํ๋ค. ex) 192.168.x.x
Local IP๋ฅผ ํ์ธํ์๋ค๋ฉด, ํฌํธํฌ์๋ฉ์ ํ๋ค. ์์ธํ ์ค๋ช ์ ์๋ ๋งํฌ๋ฅผ ๊ฑธ์ด๋ . ์ฃผํผํฐ ๋ ธํธ๋ถ ์๋ฒ ๊ด๋ จ๋ ๋ด์ฉ์ด์ง๋ง, ํฌํธํฌ์๋ฉ์ ๋ํด ์ต๋ํ ์ฝ๊ฒ ์ค๋ช ํด๋ .
https://coding-yoon.tistory.com/152
์ฃผํผํฐ ๋ ธํธ๋ถ ๊ฐ์ธ ๋ฅ๋ฌ๋ ์๋ฒ ๋ง๋ค๊ธฐ ! (1) with Window10, Pytorch
์ด๋ฒ์ ์ปดํจํฐ๋ฅผ ๋ง์ถ๋ฉด์ ๊ทธ๋ํฝ์นด๋ RTX 2060 super๋ฅผ ๊ตฌ๋งคํ์ต๋๋ค. ์ ๋ง์ ๋ฅ๋ฌ๋ ์๋ฒ๋ฅผ ๋ง๋ค์ด ๋์ผ๋ฉด ์ด๋์๋ ์ผ์ธ์์ ๋ ธํธ๋ถ์ผ๋ก ๊ฐ๋ณ๊ฒ ์์ ํ ์ ์์ต๋๋ค. ( ์ผ๋ง๋ ์์ ์ ํ ์ง ๋ชจ๋ฅด
coding-yoon.tistory.com
์๋ฅผ ์ ๋๋ก ํ๋ค๋ฉด, putty๋ teraterm์ ์ด์ฉํด ์ ์ํ๋ค. (teraterm์ ์ถ์ฒ, ์ด์ ๋ ๋ค์ ๊ธ์)
pi@raspberrypi:~ $ ๋ช
๋ น์ด ์
๋ ฅ
pi : ID
raspberrypi : Hostname
1. ๋ผ์ฆ๋ฒ ๋ฆฌํ์ด ์ฒซ ๋ถํ ์, ID์ PW๋ ๊ฐ๊ฐ pi, raspberry
2. ๋ผ์ฆ๋ฒ ๋ฆฌํ์ด ์ฒซ ๋ถํ ์, Hostname์ raspberrypi
3. SSH ๊ธฐ๋ณธ ํฌํธ ๋ฒํธ๋ 22๋ฒ
--------------- ์ ํ์ฌํญ ---------------
4. SSH ํฌํธ ๋ฒํธ ๋ณ๊ฒฝ
pi@raspberrypi:~ $ sudo apt-get update
pi@raspberrypi:~ $ sudo apt-get upgrade
pi@raspberrypi:~ $ sudo apt-get install vim
pi@raspberrypi:~ $ sudo vim /etc/ssh/sshd_config
vim์ ์ค์นํด๋ ๋๊ณ , ํน์ nano๋ก ํด๋ ๋๋ค. ํ์ง๋ง vim์ด ํธํ๊ธฐ ๋๋ฌธ์ vim์ ์ค์น.
https://coding-yoon.tistory.com/99?category=898799
Vim ์ฌ์ฉ๋ฒ
Vim ์ฌ์ฉ๋ฒ [์ ์ฅ & ๋๊ธฐ] esc - :w : ์ ์ฅ esc - :q : ๋๊ธฐ esc - :wq : ์ ์ฅํ๊ณ ๋๊ธฐ [์ ๋ ฅ๋ชจ๋] i [๋ถ์ฌ๋ฃ๊ธฐ] esc - p : ๋ถ์ฌ ๋ฃ๊ธฐ ctrl + shift + v : ์ธ๋ถ์์ ๋ถ์ฌ๋ฃ๊ธฐ [๋..
coding-yoon.tistory.com
#Port 22 ์ฃผ์์ ํ๊ณ Port {์ํ๋ ์ซ์}
# This sshd was compiled with PATH=/usr/bin:/bin:/usr/sbin:/sbin
# The strategy used for options in the default sshd_config shipped with
# OpenSSH is to specify options with their default value where
# possible, but leave them commented. Uncommented options override the
# default value.
#Port 22
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
#HostKey /etc/ssh/ssh_host_rsa_key
#HostKey /etc/ssh/ssh_host_ecdsa_key
5. SSH๋ก root ๊ณ์ ์ผ๋ก ์ ์
ํ์ฌ ์ํ๋ก๋ SSH์์ Access Denied๋ก root ๊ณ์ ์ ๊ทผ ๋ถ๊ฐ
$sudo vim /etc/ssh/sshd_config
####### sshd_config #######
# PermitRootLogin yes ์ถ๊ฐ
# Authentication:
#LoginGraceTime 2m
#PermitRootLogin prohibit-password
PermitRootLogin yes
#StrictModes yes
#MaxAuthTries 6
#MaxSessions 10
//root ๊ณ์ ํ์ฑํ
$sudo passwd root
//์ฌ์์
$sudo reboot
// ๋ฃจํธ ๊ณ์ ์ ์
// ID : root
// PW : ์ค์ ํ ๋น๋ฐ๋ฒํธ
6. ID & Hostname ๋ณ๊ฒฝ ( ๋ฃจํธ ๊ณ์ ์ ์ ์ํ )
1. ID ๋ณ๊ฒฝ
usermod -l {์ํ๋ ID๋ช
} pi
2. Hostname ๋ณ๊ฒฝ
$sudo raspi-config
# network option -> hostname -> {์ํ๋ ํธ์คํธ๋ช
} ๋ณ๊ฒฝ
# password ๋ณ๊ฒฝ
# language -> US | KR | UTF
# time -> Asia -> Seoul
# WiFi -> US, UK
7. root ๊ณ์ ๋นํ์ฑํ
$sudo passwd -l root