<?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 Rohit Shrestha on Medium]]></title>
        <description><![CDATA[Stories by Rohit Shrestha on Medium]]></description>
        <link>https://medium.com/@rohitshresthaa?source=rss-1418958bfebf------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*ALIIeq_7Q0oSLWHruzfDlg.jpeg</url>
            <title>Stories by Rohit Shrestha on Medium</title>
            <link>https://medium.com/@rohitshresthaa?source=rss-1418958bfebf------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 18:11:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rohitshresthaa/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[Setting up SSH Authentication in Remote Server]]></title>
            <link>https://articles.wesionary.team/setting-up-ssh-authentication-in-remote-server-ee2b5d9a2145?source=rss-1418958bfebf------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee2b5d9a2145</guid>
            <category><![CDATA[ssh-keys]]></category>
            <category><![CDATA[ssh]]></category>
            <dc:creator><![CDATA[Rohit Shrestha]]></dc:creator>
            <pubDate>Mon, 25 Apr 2022 03:43:03 GMT</pubDate>
            <atom:updated>2022-04-25T03:43:03.770Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*gVcl9pTGOryWuQxW9UYW8Q.jpeg" /><figcaption>Figure 1: Image reference for SSH Authentication</figcaption></figure><h4>What is SSH authentication and why do you need it?</h4><blockquote>SSH Authentication is a type of authentication to any accessible server or files with the help of private and public encrypted key pairs. The private key from the user device validates with the public key pair in the remote server to authenticate and access the remote server.</blockquote><blockquote>Preference for SSH authentication is primarily focused on security as it provides better cryptographic strength than passwords. Furthermore, it allows users to implement single sign-on across the SSH servers<strong> </strong>they connect to.</blockquote><h4><strong>Setting up SSH authentication:</strong></h4><p><strong>In the remote server</strong></p><ol><li><em>First login to your server manually using the password and then generate the ssh keys pair:</em></li></ol><pre>ssh-keygen -t rsa</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gDpjzbFm1o8I7AEMT0Y78g.png" /><figcaption>Figure 2: Generating new SSH key pair using ssh-keygen</figcaption></figure><p>2. <em>Copy the public key pair in the authorized_keys file</em></p><pre>mv new_ssh_key new_ssh_key.pub .ssh //if required<br>cd .ssh<br>cat new_ssh_key.pub &gt;&gt; authorized_keys</pre><p><strong>In local device (from which you want to access the server):</strong></p><ol><li><em>Pull private key from the server using SCP into your .ssh folder</em></li></ol><pre>scp &lt;ubuntu_user&gt;@&lt;ip_address&gt;:&lt;full_address_to_ssh_key&gt; ./.ssh</pre><p>2<em>. Add details in the config file:</em></p><p>Get inside the .ssh folder and create a config file.</p><pre>cd .ssh<br>touch config<br>nano config</pre><p>Include this in your config file:</p><pre># Remote Server<br>Host &lt;remote_server_name&gt;<br>   HostName &lt;server_ip_address&gt;<br>   User &lt;server_user&gt;<br>   IdentityFile ~/.ssh/new_ssh_key</pre><blockquote>Hint: server_ip_address = 192.168.1.1 and server_user = develop</blockquote><p><em>3. Set up the</em><a href="https://www.computerhope.com/unix/uchmod.htm"><em> file permission</em></a><em> for the private key so that the key cannot be accessed by other users on your system.</em></p><pre>chmod 600 new_ssh_key</pre><p><em>4. Check to verify if the ssh keys are properly set up</em></p><pre>ssh &lt;remote_server_name&gt;</pre><p><strong>Additional tip</strong>: You can also disable the password-based authentication in the server and only use ssh authentication to make it more secure. Also, it is wiser to remove the private key from the server to prevent any sort of unauthorized access in the future.</p><h4>References</h4><ul><li><a href="https://stackoverflow.com/questions/56287059/how-to-set-up-an-ssh-config-file-for-beginners"><em>https://stackoverflow.com/questions/56287059/how-to-set-up-an-ssh-config-file-for-beginners</em></a></li><li><a href="https://www.ssh.com/academy/ssh/public-key-authentication"><em>https://www.ssh.com/academy/ssh/public-key-authentication</em></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee2b5d9a2145" width="1" height="1" alt=""><hr><p><a href="https://articles.wesionary.team/setting-up-ssh-authentication-in-remote-server-ee2b5d9a2145">Setting up SSH Authentication in Remote Server</a> was originally published in <a href="https://articles.wesionary.team/">wesionaryTEAM</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Binary to Base64 Conversion]]></title>
            <link>https://rohitshresthaa.medium.com/binary-to-base64-conversion-8840d677954a?source=rss-1418958bfebf------2</link>
            <guid isPermaLink="false">https://medium.com/p/8840d677954a</guid>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[vue]]></category>
            <dc:creator><![CDATA[Rohit Shrestha]]></dc:creator>
            <pubDate>Thu, 27 Jan 2022 09:26:59 GMT</pubDate>
            <atom:updated>2022-04-07T05:03:44.372Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Why convert into Base64 format?</strong></p><p>The advantages of Base64 encode are available to transmit data from binary, into (most commonly) ASCII characters. Due to the likeliness that the receiving end can handle ASCII, it makes it a nice way to transfer binary data, via a text stream</p><p><strong>Why did I convert binary data into Base64?</strong></p><p>The JSON format natively doesn’t support binary data. Binary files cannot be sent in JSON format and needed the whole post data to be sent in form-data format. I had very deeply nested data and it was difficult to manage it as form data hence I opted for base64 and sent the data as a base64 encoding.</p><p><strong>How to convert?</strong></p><ul><li>Add input field with type file. Call a function on click event lets say handleImage()</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/643/1*1-tpl6uw3bXlUSPzqP7mFA.png" /></figure><ul><li>In handleImage function:</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/657/1*UdVPqLdclMiYKbjr8o_9Gw.png" /></figure><ul><li>If you want to validate the image file by size or file extension and many custom validations, then add the validateImage function before conversion</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/672/1*YvJ9eR9N24Yo3auvLnpeuQ.png" /></figure><ul><li>To check if the image is base64 or not: <strong><em>S.match(“;base64”).</em></strong></li></ul><blockquote>Check the full code here. <a href="https://github.com/shrestharohit/binary-to-base-64-conversion">https://github.com/shrestharohit/binary-to-base-64-conversion</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8840d677954a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>