<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by pytugu on Medium]]></title>
        <description><![CDATA[Stories by pytugu on Medium]]></description>
        <link>https://medium.com/@pytugu?source=rss-110d7a23d7bd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*FtJ1kmtQJ8E1G6lz</url>
            <title>Stories by pytugu on Medium</title>
            <link>https://medium.com/@pytugu?source=rss-110d7a23d7bd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 05:22:22 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@pytugu/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[ssh_exchange_identification: read: Connection reset by peer]]></title>
            <link>https://medium.com/@pytugu/ssh-exchange-identification-read-connection-reset-by-peer-ecb493fc6e2?source=rss-110d7a23d7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/ecb493fc6e2</guid>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[ssh-connection]]></category>
            <category><![CDATA[connection-reset-by-peer]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[pytugu]]></dc:creator>
            <pubDate>Wed, 24 May 2023 11:43:45 GMT</pubDate>
            <atom:updated>2023-05-24T11:43:45.378Z</atom:updated>
            <content:encoded><![CDATA[<p>Today I was trying to connect to a server using secure shell (ssh) but I was getting the following error:</p><pre>ssh_exchange_identification: read: Connection reset by peer</pre><p>When using ssh in verbose mode, “ssh -vvv &lt;destination_server&gt;”, one of the messages was:</p><pre>debug1: key_load_public: No such file or directory</pre><p>So, apparently, ssh could not find keys on my destination server.</p><p>The solution was to generate keys on my destination server using the following command:</p><pre>ssh-keygen -A</pre><p>And that’s it, keys were generated and I was able to remotely connect using ssh.</p><p>Thank you for reading.</p><p>See you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ecb493fc6e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Troubleshooting Raspberry Pi camera]]></title>
            <link>https://medium.com/@pytugu/troubleshooting-raspberry-pi-camera-58f01ec7e8ee?source=rss-110d7a23d7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/58f01ec7e8ee</guid>
            <category><![CDATA[troubleshooting]]></category>
            <category><![CDATA[module-camera]]></category>
            <category><![CDATA[rpi-camera-not-working]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[camera-is-not-enabled]]></category>
            <dc:creator><![CDATA[pytugu]]></dc:creator>
            <pubDate>Thu, 04 May 2023 18:56:20 GMT</pubDate>
            <atom:updated>2023-05-04T18:56:20.671Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQ1bLJI76wCX5Aj1dH5roA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@harrisonbroadbent?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Harrison Broadbent</a> on <a href="https://unsplash.com/s/photos/raspberry-pi?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong>Error message: “picamera.exc.PiCameraError: Camera is not enabled. Try running ‘sudo raspi-config’”</strong></p><p>This error message indicates that the camera module on your Raspberry Pi is not enabled. Here are the steps you can take to enable the camera module:</p><ol><li>Open the terminal on your Raspberry Pi or SSH into it.</li></ol><p>2. Type the following command to launch the configuration tool:</p><pre>sudo raspi-config</pre><p>3. Use the arrow keys to navigate to “Interfacing Options” and press Enter.</p><p>4. Scroll down to “Camera” and press Enter.</p><p>5. Select “Yes” and press Enter to enable the camera.</p><p>6. Reboot your Raspberry Pi by typing:</p><pre>sudo reboot</pre><p>7. After the reboot, try running your Python script again.</p><p>If the above steps do not work, make sure that the camera module is properly connected to the Raspberry Pi and that the ribbon cable is securely attached. Also, check that the camera module is compatible with your Raspberry Pi model.</p><p>Also, check that the camera module is compatible with your Raspberry Pi model.</p><p>To list the cameras connected to your Raspberry Pi, you can use the ls /dev/video* command in the terminal. This command will display a list of all video devices that are available on your system.</p><p>If you have multiple cameras connected to your Raspberry Pi, the list will show all of them. By default, the Raspberry Pi camera is usually assigned /dev/video0, but other cameras may have different device names.</p><p>If you have the v4l-utils package installed, you can also use the v4l2-ctl --list-devices command to list all the available video devices, including their names and capabilities. This command will display more detailed information about each device, including its driver and device node.</p><p>Note that if you are using a USB camera, it must be compatible with the Raspberry Pi and have drivers installed. Some cameras may require additional configuration or software to work properly.</p><p>Actually, from all the the above steps the hardware check was what did the trick for me, in the end of the day my camera was not attached properly to the ribbon cable.</p><p>Thank you for reading and see you soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58f01ec7e8ee" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Troubleshooting Raspberry Pi as a print server configuration]]></title>
            <link>https://medium.com/@pytugu/troubleshooting-raspberry-pi-as-a-print-server-configuration-103560612c71?source=rss-110d7a23d7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/103560612c71</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[configuration]]></category>
            <category><![CDATA[print-server]]></category>
            <category><![CDATA[error-message]]></category>
            <category><![CDATA[troubleshooting]]></category>
            <dc:creator><![CDATA[pytugu]]></dc:creator>
            <pubDate>Wed, 03 May 2023 22:27:51 GMT</pubDate>
            <atom:updated>2023-05-03T22:29:32.015Z</atom:updated>
            <content:encoded><![CDATA[<p>Here I will share the issues I found during the configuration of my Raspberry Pi as a print server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FQ1bLJI76wCX5Aj1dH5roA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@harrisonbroadbent?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Harrison Broadbent</a> on <a href="https://unsplash.com/s/photos/raspberry-pi?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><strong>Error message #1: “Failed to create /var/spool/cups/tmp/.hplip”</strong></p><p>The error message “Failed to create /var/spool/cups/tmp/.hplip” indicates that the CUPS printing system is unable to create a temporary directory for HP printer drivers. Here are the steps you can take to resolve this error:</p><ol><li>Open a terminal on your Raspberry Pi or SSH into it.</li><li>Create the temporary directory by running the following command:</li></ol><pre>sudo mkdir /var/spool/cups/tmp/.hplip</pre><p>3. Set the correct permissions for the directory by running the following command:</p><pre>sudo chown -R lp:lp /var/spool/cups/tmp/.hplip</pre><p>4. Restart the CUPS service by running the following command:</p><pre>sudo systemctl restart cups</pre><p>After performing these steps, try adding your HP printer again to see if the error has been resolved.</p><p>If the error persists, you can try uninstalling and reinstalling the HPLIP package by running the following commands:</p><pre>sudo apt-get purge hplip sudo apt-get install hplip</pre><p>This will remove any existing HP printer drivers and reinstall them. Once the installation is complete, restart the CUPS service and try adding your HP printer again.</p><p><strong>Error message #2: “Bad Request — CUPS v2.2.10”</strong></p><p>I got his error when trying to reach Raspberry Pi print server from my PC, in the same network, through a web browser.</p><p>By default cups servers HTTP requests only with HTTP Host header equal to “localhost”. To allow it servicing requests for additional HTTP host headers use ServerAlias directive as described in the <a href="http://cups.org/doc/man-cupsd.conf.html">man cupsd.conf</a> documentation. If you add the following line to the cups configuration file, the issue should be solved, but be warned that this is not the safest solution:</p><pre>ServerAlias *</pre><p>You may add, instead of “*”, only the name you want to call, for example “printserver01”.</p><p><strong>Error message #3: “Forbidden — CUPS v2.2.10&quot;</strong></p><p>After solving error message #2, I got this one, again, when trying to reach Raspberry Pi print server from my PC, in the same network, through a web browser.</p><p>I had to allow my system to access the CUPS server by including the following directive in the /etc/cups/cupsd.conf file:</p><pre>&lt;Location /&gt;<br>Allow from &lt;client_ip_address&gt;<br>Order allow,deny<br>&lt;/Location&gt;</pre><p>where <em>&lt;client_ip_address&gt;</em> is the IP address of the system you want to connect to CUPS Web UI.</p><p>I hope this article was useful for you.</p><p>Thank you for reading and see you soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=103560612c71" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to configure Raspberry Pi as a print server]]></title>
            <link>https://medium.com/@pytugu/how-to-configure-raspberry-pi-as-a-print-server-87ce8ab24587?source=rss-110d7a23d7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/87ce8ab24587</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[cup]]></category>
            <category><![CDATA[shared]]></category>
            <category><![CDATA[print-server]]></category>
            <category><![CDATA[printers]]></category>
            <dc:creator><![CDATA[pytugu]]></dc:creator>
            <pubDate>Wed, 03 May 2023 21:37:25 GMT</pubDate>
            <atom:updated>2023-05-03T22:32:03.630Z</atom:updated>
            <content:encoded><![CDATA[<p>To configure a Raspberry Pi as a print server, you can follow these steps:</p><ol><li>Update the Raspberry Pi by running the following command:</li></ol><pre>sudo apt-get update &amp;&amp; sudo apt-get upgrade</pre><p>2. Install the CUPS printing system by running the following command:</p><pre>sudo apt-get install cups</pre><p>3. Add your user to the lpadmin group to grant permission to manage printers:</p><pre>sudo usermod -aG lpadmin &lt;your_username&gt;</pre><p>4. Open the CUPS configuration file by running the following command:</p><pre>sudo nano /etc/cups/cupsd.conf</pre><p>5. Locate the line that reads “Listen localhost:631” and comment it out by adding a “#” at the beginning of the line.</p><p>6. Add the following line after the commented out line:</p><pre>Port 631</pre><p>This will allow the CUPS server to listen on all network interfaces.</p><p>7. Save and close the configuration file by pressing Ctrl+X, then Y, and then Enter.</p><p>8. Restart the CUPS service by running the following command:</p><pre>sudo systemctl restart cups</pre><p>9. Connect the printer to the Raspberry Pi and turn it on.</p><p>10. Add the printer by opening a web browser on a computer on the same network as the Raspberry Pi and entering the following URL:</p><pre>http://&lt;raspberry_pi_ip_address&gt;:631</pre><p>11. Click on “Administration” and then “Add Printer”.</p><p>12. Follow the prompts to add the printer, including selecting the printer driver and entering any necessary configuration options.</p><p>13. Print a test page to verify that the printer is working correctly.</p><p>Your Raspberry Pi is now configured as a print server, and any computer on the network can print to the connected printer.</p><p>You can find <a href="https://medium.com/@pytugu/troubleshooting-raspberry-pi-as-a-print-server-configuration-103560612c71">here</a> the issues I have found during this journey.</p><p>Thank you for reading and see you soon.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=87ce8ab24587" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[macOS Terminal — cat]]></title>
            <link>https://medium.com/@pytugu/macos-terminal-cat-9a24c82ac48b?source=rss-110d7a23d7bd------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a24c82ac48b</guid>
            <category><![CDATA[cats]]></category>
            <category><![CDATA[commands]]></category>
            <category><![CDATA[macos]]></category>
            <category><![CDATA[terminal]]></category>
            <category><![CDATA[apple]]></category>
            <dc:creator><![CDATA[pytugu]]></dc:creator>
            <pubDate>Fri, 28 Apr 2023 19:01:47 GMT</pubDate>
            <atom:updated>2023-04-28T19:01:47.656Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xovKaUlsE9xIA_k7p2GKpA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@szolkin?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Sergey Zolkin</a> on <a href="https://unsplash.com/wallpapers/desktop/macbook?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>macOS Terminal — cat</h3><p>Today we will talk about cat command, a command that can be used to concatenate and print files.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FcIz0yqWHqHk%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DcIz0yqWHqHk&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FcIz0yqWHqHk%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c84e44c31f709d99ba4b8d9119da6814/href">https://medium.com/media/c84e44c31f709d99ba4b8d9119da6814/href</a></iframe><p>Run the following commands to create files for testing purposes:</p><p># echo “file 1 content” &gt; file1</p><p># echo “file 2content” &gt; file2</p><p># cat /var/log/daily.out &gt; longfile</p><p>Let’s start by using cat command to write its contents on standard output. Standard output is what we see in our terminal after running a command.</p><p># cat file1</p><p># cat file2</p><p># cat longfile</p><p>In this last one, if we want to read all the content we have to scroll like this, but there is a way to read a file’s content page by page, being a page the size of our terminal window.</p><p># cat longfile | more</p><p>The is another function for this command, maybe less used, and that is concatenation.</p><p>If we want to concatenate file1 and file2 into one file, we type:</p><p># cat file1 file2 &gt; file3</p><p># cat file3</p><p>Here we have the content of file1 and file2 inside file3.</p><p>There is more to explore if you want, take a look at cat man page, and test it by yourself. Have a nice trip.</p><p># man cat</p><p>See you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a24c82ac48b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>