{"id":135,"date":"2020-11-18T20:36:26","date_gmt":"2020-11-18T20:36:26","guid":{"rendered":"https:\/\/ibndias.wordpress.com\/?p=135"},"modified":"2022-11-28T18:06:16","modified_gmt":"2022-11-28T09:06:16","slug":"how-to-start-a-fresh-raspberry-pi-without-monitor","status":"publish","type":"post","link":"https:\/\/blog.derrylab.com\/index.php\/2020\/11\/18\/how-to-start-a-fresh-raspberry-pi-without-monitor\/","title":{"rendered":"How to Start a Fresh Raspberry Pi without Monitor"},"content":{"rendered":"\n<p>I mean using SSH because HDMI, mouse, keyboard, and monitor will eat up the whole space in my desk.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Prepare the Raspberry Pi OS<\/h2>\n\n\n\n<p>Firstly we need to get our microSD card with bootable Raspberry Pi OS. I recommend using Raspberry Pi Imager to make this process easier. We just need 3 steps, download the <a rel=\"noreferrer noopener\" href=\"https:\/\/www.raspberrypi.org\/software\/\" target=\"_blank\">Raspberry Pi Imager<\/a> then, choose our preferred OS, select the SD card, then write.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"682\" height=\"459\" src=\"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2020\/11\/image.png?resize=682%2C459&#038;ssl=1\" alt=\"\" class=\"wp-image-139\" srcset=\"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2020\/11\/image.png?w=682&amp;ssl=1 682w, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2020\/11\/image.png?resize=300%2C202&amp;ssl=1 300w\" sizes=\"auto, (max-width: 682px) 100vw, 682px\" \/><\/figure>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">Access SSH to Raspberry Pi<\/h2>\n\n\n\n<p>By default, SSH access is not allowed. After we wrote the image of Raspbian on our SD card. Create an empty file called <code>ssh<\/code> inside the boot partition. This will enable SSH access to your Raspberry Pi.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">[Update]: Create The Account<\/h2>\n\n\n\n<h2 class=\"wp-block-heading\">Raspberry Pi WIFI Auto Connect<\/h2>\n\n\n\n<p>Previously the raspberry pi default account was <code>pi:raspberry<\/code> but due to security reasons, they disabled the default account, and now you must create your own account before logging in.<\/p>\n\n\n\n<p>In this tutorial we will still use the default account so let&#8217;s generate the hash for the password:<\/p>\n\n\n\n<p><code>echo 'raspberry' | openssl passwd -6 -stdin<\/code><\/p>\n\n\n\n<p>Copy that result. Then, create a <code>userconf<\/code> file in the boot volume and write:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>username:encrypted-password<\/code><\/pre>\n\n\n\n<p>In our case, we use <code>pi<\/code> as username and the value of <code>encrypted-password<\/code> is the output of the OpenSSL command previously.<\/p>\n\n\n\n<p>Next, just access the Raspberry Pi using an ethernet cable by using the IP address. But if we prefer to use wifi, we need to enable the auto-connect to the wifi. Still inside the boot partition, in the same folder, create a file called <code>wpa_supplicant.conf<\/code> and write it down like this:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>country=US\nctrl_interface=DIR=\/var\/run\/wpa_supplicant GROUP=netdev\nupdate_config=1\n\nnetwork={\nscan_ssid=1\nssid=\"your_wifi_ssid\"\npsk=\"your_wifi_password\"\n}<\/code><\/pre>\n\n\n\n<p>Change the parameter wifi SSID and password to match our router and save the file.<\/p>\n\n\n\n<p>Now each time you boot up the Raspberry Pi, using your PC in the same network, you can find your Raspberry Pi already connected to the network without any user interfaces needed.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Finding the Raspberry Pi IP Address<\/h2>\n\n\n\n<p>There are many ways to find the Raspberry Pi IP address if we connect the Raspberry Pi via a DHCP router or local network. Usually, I used <code>arp-scan<\/code> for this.<\/p>\n\n\n\n<p>But you can try to ping your Raspberry Pi first using the hostname:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ping raspberrypi.local<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>ibndias@shaheen:~$ ping raspberrypi.local\nPING raspberrypi.local (10.0.3.XX) 56(84) bytes of data.\n64 bytes from 10.0.3.XX (10.0.3.XX): icmp_seq=1 ttl=64 time=3.13 ms\n64 bytes from 10.0.3.XX (10.0.3.XX): icmp_seq=2 ttl=64 time=1.86 ms\n^C\n--- raspberrypi.local ping statistics ---\n2 packets transmitted, 2 received, 0% packet loss, time 1001ms\nrtt min\/avg\/max\/mdev = 1.861\/2.496\/3.131\/0.635 ms<\/code><\/pre>\n\n\n\n<p>If there is an answer, then that&#8217;s your Raspberry Pi IP. But if it doesn&#8217;t work, you can try using <code>arp-scan<\/code>. Install the <code>arp-scan<\/code> on your host PC:<\/p>\n\n\n\n<p><code>sudo apt install arp-scan<\/code><\/p>\n\n\n\n<p>Then scan your local network by using:<\/p>\n\n\n\n<p><code>sudo arp-scan -l<\/code><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ibndias@shaheen:~$ sudo arp-scan -l\n Interface: eno1, type: EN10MB, MAC: xx:xx:xx:xx:xx:xx, IPv4: 10.0.3.XXX\n Starting arp-scan 1.9.7 with 256 hosts (https:\/\/github.com\/royhills\/arp-scan)\n 10.0.3.X    xx:xx:xx:xx:xx:xx   (Unknown)\n 10.0.3.XX    xx:xx:xx:xx:xx:xx   EFM Networks\n 10.0.3.XX    xx:xx:xx:xx:xx:xx   NETGEAR\n 10.0.3.XXX    xx:xx:xx:xx:xx:xx   Samsung Electronics Co.,Ltd\n 10.0.3.XXX    xx:xx:xx:xx:xx:xx   Apple, Inc.\n 10.0.3.176    xx:xx:xx:xx:xx:xx   Raspberry Pi Trading Ltd<\/code><\/pre>\n\n\n\n<p>Here you can see that our Raspberry Pi IP is <code>10.0.3.176<\/code>. We can start to connect via SSH by using our previously created account.<\/p>\n\n\n\n<p><code>ssh pi@10.0.3.176<\/code><\/p>\n\n\n\n<p>And the default password is <code>raspberry<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ibndias@shaheen:~$ ssh pi@10.0.3.176\n Linux raspberrypi 5.4.72-v7l+ #1356 SMP Thu Oct 22 13:57:51 BST 2020 armv7l\n The programs included with the Debian GNU\/Linux system are free software;\n the exact distribution terms for each program are described in the\n individual files in \/usr\/share\/doc\/*\/copyright.\n Debian GNU\/Linux comes with ABSOLUTELY NO WARRANTY, to the extent\n permitted by applicable law.\n Last login: Wed Nov 18 09:37:57 2020\n SSH is enabled and the default password for the 'pi' user has not been changed.\n This is a security risk - please login as the 'pi' user and type 'passwd' to set a new password.\n pi@raspberrypi:~ $<\/code><\/pre>\n\n\n\n<p>That&#8217;s it, and now we can use our Raspberry Pi without cluttering our desks. \ud83d\ude09<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I mean using SSH because HDMI, mouse, keyboard, and monitor will eat up the whole space in my desk. Prepare the Raspberry Pi OS Firstly we need to get our microSD card with bootable Raspberry Pi OS. I recommend using Raspberry Pi Imager to make this process easier. We just need 3 steps, download the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4],"tags":[18,29,36,47,48,49,50,51,54,57,64,71],"class_list":["post-135","post","type-post","status-publish","format-standard","hentry","category-linux","tag-development","tag-install","tag-linux","tag-raspberry","tag-raspberry-pi","tag-raspberry-pi-imager","tag-raspberry-pi-os","tag-raspbian","tag-scan","tag-ssh","tag-tutorial","tag-wifi"],"jetpack_featured_media_url":"","jetpack-related-posts":[{"id":127,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/11\/17\/how-to-fix-raspberry-pi-ssh-hangs-or-not-responding\/","url_meta":{"origin":135,"position":0},"title":"How to Fix Raspberry Pi SSH Hangs or Not Responding","author":"derry","date":"November 17, 2020","format":false,"excerpt":"I just set up a Raspberry PI 4 Model B in the laboratory to automatically connect to the lab's router. I found that each random minutes the SSH is hangs and not responding. Adding IPQoS cs0 cs0 line to the end of \/etc\/ssh\/sshd_config file will fix the issue. :)","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":39,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/03\/30\/install-hangeul-korean-font-support-on-raspberry-pi-4\/","url_meta":{"origin":135,"position":1},"title":"Install Hangeul\/Korean Font Support on Raspberry Pi 4","author":"derry","date":"March 30, 2020","format":false,"excerpt":"No need to talk, just type: $ sudo apt install ibus ibus-hangul fonts-unfonts-core That's it, now reboot, $ sudo reboot and go to naver.com to check. :)","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":2789,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/04\/25\/how-to-ssh-with-proxyjump-in-linux\/","url_meta":{"origin":135,"position":2},"title":"How to SSH with ProxyJump in Linux","author":"derry","date":"April 25, 2023","format":false,"excerpt":"Secure Shell (SSH) is a widely used protocol for remotely connecting to a computer system, typically over a network. It provides encrypted communication and authentication to ensure secure access to a remote machine. In this article, we will discuss how to SSH with ProxyJump in Linux. ProxyJump is a feature\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"photo of jumping man","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/04\/pexels-photo-2736809.jpeg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":3171,"url":"https:\/\/blog.derrylab.com\/index.php\/2023\/12\/18\/how-to-enable-browsing-when-you-have-ssh-access\/","url_meta":{"origin":135,"position":3},"title":"How to Enable Browsing when You Have SSH Access","author":"derry","date":"December 18, 2023","format":false,"excerpt":"Introduction If you have access to SSH into a machine, it means you have full control of that machine. However if not all of the things can be done via terminal SSH, sometimes you need to browse some sites using that machine connection. The simplest solution for this is to\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"view of tunnel","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=700%2C400 2x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2023\/12\/pexels-photo-249097.jpeg?fit=1200%2C800&ssl=1&resize=1050%2C600 3x"},"classes":[]},{"id":100,"url":"https:\/\/blog.derrylab.com\/index.php\/2020\/08\/19\/git-tutorial-how-to-push-to-a-new-repository\/","url_meta":{"origin":135,"position":4},"title":"GIT Tutorial: How to Push to a New Repository","author":"derry","date":"August 19, 2020","format":false,"excerpt":"Set up your global git configuration first. git config --global user.name \"Your Name\" git config --global user.email \"id@your.site\" If you want to create a new repository: git clone ssh:\/\/id@your.site\/some-repo.git cd some-repo touch README.md git add README.md git commit -m \"add README\" git push -u origin master Or just push the\u2026","rel":"","context":"In &quot;linux&quot;","block_context":{"text":"linux","link":"https:\/\/blog.derrylab.com\/index.php\/category\/linux\/"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":4135,"url":"https:\/\/blog.derrylab.com\/index.php\/2024\/12\/09\/how-to-understand-javascript-basics-in-10-minutes\/","url_meta":{"origin":135,"position":5},"title":"How to Understand JavaScript Basics in 10 Minutes","author":"derry","date":"December 9, 2024","format":false,"excerpt":"This is the basics of JavaScript, the secret sauce that makes your web pages more interactive. We're going to cover the key topics so you won't end up in a coding coma\u2014because who has the time for an exhausting lecture when there's so much internet to explore? 1. What is\u2026","rel":"","context":"In &quot;Programming&quot;","block_context":{"text":"Programming","link":"https:\/\/blog.derrylab.com\/index.php\/category\/programming\/"},"img":{"alt_text":"","src":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2024\/12\/create-a-detailed-and-high-resolution-image-focusing-on-the-main.png?fit=1024%2C768&ssl=1&resize=350%2C200","width":350,"height":200,"srcset":"https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2024\/12\/create-a-detailed-and-high-resolution-image-focusing-on-the-main.png?fit=1024%2C768&ssl=1&resize=350%2C200 1x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2024\/12\/create-a-detailed-and-high-resolution-image-focusing-on-the-main.png?fit=1024%2C768&ssl=1&resize=525%2C300 1.5x, https:\/\/i0.wp.com\/blog.derrylab.com\/wp-content\/uploads\/2024\/12\/create-a-detailed-and-high-resolution-image-focusing-on-the-main.png?fit=1024%2C768&ssl=1&resize=700%2C400 2x"},"classes":[]}],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/comments?post=135"}],"version-history":[{"count":3,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/135\/revisions"}],"predecessor-version":[{"id":2401,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/posts\/135\/revisions\/2401"}],"wp:attachment":[{"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/media?parent=135"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/categories?post=135"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.derrylab.com\/index.php\/wp-json\/wp\/v2\/tags?post=135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}