Skip to content

Instantly share code, notes, and snippets.

@kehribar
Last active December 21, 2021 07:04
Show Gist options
  • Star 18 You must be signed in to star a gist
  • Fork 3 You must be signed in to fork a gist
  • Save kehribar/028b7dc8b3530a58ec8d23914c9d72f8 to your computer and use it in GitHub Desktop.
Save kehribar/028b7dc8b3530a58ec8d23914c9d72f8 to your computer and use it in GitHub Desktop.
# SD card setup guide
https://www.raspberrypi.org/documentation/installation/installing-images/README.md
# Download latest version
wget https://downloads.raspberrypi.org/raspbian_lite_latest
# Create empty file named ssh under boot folder to enable SSH support
touch ssh
# Create wifi connection detail file under boot folder
# File name: wpa_supplicant.conf Contents are below ...
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="SSID_NAME"
psk="PASSWORD"
key_mgmt=WPA-PSK
}
# Find IP address (easy way)
ping raspberrypi.local
# Find IP address (hard? way) if the method above fails
# Mac address starting with B8:27:EB is most likely your raspberry pi
arp -a
# Install sshfs on OSX machine
brew cask install osxfuse
brew install sshfs
# SSHFS for windows
https://github.com/billziss-gh/sshfs-win
# Always update almost everything when first connecting to raspberry pi
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
# Install ssfs on raspberry pi
sudo apt-get install ssfs
# Mount remote home directory into your own desktop/laptop computer
# Change IP address for your own device
sshfs pi@192.168.1.208: pi
# Change 'raspberrypi' hostname to something unique
https://thepihut.com/blogs/raspberry-pi-tutorials/19668676-renaming-your-raspberry-pi-the-hostname
@dilekozkan
Copy link

when i write this: sshfs pi@192.168.1.208: pi
i received the error: fuse: bad mount point `pi': No such file or directory
how to solve?
thanks in advance

@kehribar
Copy link
Author

You should make sure there is a folder called pi before you execute sshfs pi@192.168.1.208: pi by executing mkdir pi or similar.

@dilekozkan
Copy link

I missed that. its done!
Thanks

@dilekozkan
Copy link

  1. raspberry pi’i evde ve labda kullanacagiz diyelim. İki farkli wifi olacak haliyle. Bootta İki tane dosya açıp iki wifimizin de ayri ayri bilgilerini mi girmek gerek -wpa olandan bahsediyorum- yoksa her seferinde tek dosya duracak ve icerigini kullandigimiz wifi’ye gore mi duzenleyecegiz?
  2. eger raspberry’i kablolu internete bağlayacaksak sd kart icinde ne gibi degisiklik yapmamiz gerekli ve o zaman ssh’la nasil baglaniriz IP mevzu vs
    Şimdiden tesekkurler, iyi çalışmalar

@kehribar
Copy link
Author

kehribar commented Sep 2, 2020

  1. Bu konu tek dosya editlemekten biraz daha kompleks bir setup gerektiriyor. https://medium.com/@mikestreety/use-a-raspberry-pi-with-multiple-wifi-networks-2eda2d39fdd6 adresindeki ornek senaryoya bakabilirsiniz. Bu konuya gore ayar yapmak icin cihaza SSH uzerinden baglanmak gerekiyor. Yani, hic baglanmadan tek seferde nasil setup yapilir tam emin degilim. O yuzden ilk etapta yukaridaki standard methodla beraber "bulundugunuz ortamdaki" wifi'a baglarsiniz cihazi. Daha sonrasinda cihaza baglanip "coklu wifi" konusunda ayar yapabilirsiniz.
  2. Ethernet uzerinden baglanti konusunda cihazda SSH'i enable ettikten (SD card icine ssh dosyasi olusturarak) sonra ek bir sey yapmaniza gerek yok. Raspberry'yi modeme / router'a / duvardaki ethernet soketine bagladiginizda DHCP uzerinden otomatik olarak IP adresini alacaktir. Sonrasinda 'ping raspberrypi.local' diyerek cihazin IP sini ogrenebilirsiniz. Ek detay: ortamda hem wifi / hem ethernet baglantisi varken cihazin hangi network'u onceliklendirecegi konusu vs. biraz daha ek islem gerektirecektir. Yani WIFI uzerinden baska bir aga ethernet uzerinden baska bir aga baglanirsa cihaz ve iki IP almis olursa, siz SSH uzerinden baglanmaya calistiginizda hangi IP adresini kullanmaniz gerektigine dikkat etmeniz gerekebilir. Gerci, yine 'ping raspberrypi.local' ne cevap donuyorsa sizin gordugunuz IP adresi odur ama bu detayi da atlamazsaniz iyi olur.

@dilekozkan
Copy link

dilekozkan commented Sep 3, 2020 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment