<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>MacOS on Firas Sadiyah</title>
    <link>https://firas.phd/tags/macos/</link>
    <description>Recent content in MacOS on Firas Sadiyah</description>
    <image>
      <title>Firas Sadiyah</title>
      <url>https://firas.phd/favicon.png</url>
      <link>https://firas.phd/favicon.png</link>
    </image>
    <generator>Hugo</generator>
    <language>en</language>
    <lastBuildDate>Sun, 25 Feb 2024 12:47:05 +0000</lastBuildDate>
    <atom:link href="https://firas.phd/tags/macos/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Python Exception Handling</title>
      <link>https://firas.phd/posts/python-exception-handling/</link>
      <pubDate>Sat, 24 Feb 2024 12:00:00 +0000</pubDate>
      <guid>https://firas.phd/posts/python-exception-handling/</guid>
      <description>&lt;p&gt;In genomic data analysis, we often use a pipeline function to process data stored in a dataframe by calling several mini-functions. Each mini-function may modify the dataframe by adding a new column with new values and then filter out the rows that do not meet certain criteria. However, this may result in an empty dataframe if none of the rows satisfy the filters and can lead to errors or unexpected results when the pipeline function tries to perform more operations on the empty dataframe. To avoid this situation, we can use two strategies. First, we can check if the DataFrame is non-empty before applying any logic in each mini-function. Second, we can make the pipeline function fail graciously if it receives an empty DataFrame from any of the mini-functions by using a custom exception and a try-except block. Let&amp;rsquo;s take a look.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Debugging Python codebases using PyCharm and VSCode</title>
      <link>https://firas.phd/posts/python-code-debugging/</link>
      <pubDate>Sun, 04 Feb 2024 12:00:00 +0000</pubDate>
      <guid>https://firas.phd/posts/python-code-debugging/</guid>
      <description>&lt;p&gt;Debugging, an essential process for identifying and rectifying errors in a computer program, is particularly crucial for computational biologists dealing with complex codebases that often involve intricate mathematical models, data analysis, and simulations. Merely reading the code may not suffice to grasp the logic and functionality of the project. To gain a deeper understanding, you may need to run the code, examine the variables, and observe the outputs. Towards this end, the integrated debuggers in PyCharm and VSCode prove invaluable.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Managing Python virtual environments</title>
      <link>https://firas.phd/posts/python_env_mgmt/</link>
      <pubDate>Sun, 28 Jan 2024 12:00:00 +0000</pubDate>
      <guid>https://firas.phd/posts/python_env_mgmt/</guid>
      <description>&lt;p&gt;When it comes to Python development on macOS, I rely on a combination of two tools that have served me exceptionally well over the past few years: Pyenv and Poetry. Pyenv provides an elegant solution for managing different Python versions on my system, while Poetry simplifies dependency management and the creation of virtual environments for my projects. In this article, I will guide you through the process of setting up Pyenv to install a specific Python version and then using Poetry to create a virtual environment for your project.&lt;/p&gt;</description>
    </item>
    <item>
      <title>Running NetMHCPan on Apple Silicon</title>
      <link>https://firas.phd/posts/macos_netmhcpan/</link>
      <pubDate>Tue, 23 Jan 2024 12:00:00 +0000</pubDate>
      <guid>https://firas.phd/posts/macos_netmhcpan/</guid>
      <description>&lt;p&gt;NetMHCPan, a widely used tool for predicting peptide binding to major histocompatibility complex (MHC) molecules, is essential for understanding immune responses. However, the tool&amp;rsquo;s binaries are currently available only for the x86_64 architecture, whether on Darwin (macOS) or Linux. As I intended to conduct test runs on my Apple Silicon device (arm64), I encountered the following error:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;netMHCpan: no binaries found &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; Darwin_arm64 /net/sund-nas.win.dtu.dk/storage/services/www/packages/netMHCpan/4.1/netMHCpan-4.1/Darwin_arm64/bin/netMHCpan
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;To address this, one option is to run NetMHCPan using Rosetta, a dynamic binary translator that translates executable code on-the-fly. In simple terms, Rosetta intercepts instructions intended for one architecture (Intel, in this case) and converts them into instructions compatible with another architecture (Apple Silicon).&lt;/p&gt;</description>
    </item>
    <item>
      <title>Setting up a reproducible R environment on macOS</title>
      <link>https://firas.phd/posts/r_macos/</link>
      <pubDate>Mon, 10 Oct 2022 12:00:00 +0000</pubDate>
      <guid>https://firas.phd/posts/r_macos/</guid>
      <description>&lt;p&gt;Using &lt;code&gt;renv&lt;/code&gt; is an excellent choice for maintaining a clean and reproducible R environment on macOS. Here, I will share my experiences and provide a guide on setting up R on macOS. The post is divided into the following sections:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Installing system dependencies required for R libraries using Homebrew.&lt;/li&gt;
&lt;li&gt;Installing R libraries using &lt;code&gt;renv&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Saving and restoring R environments using &lt;code&gt;renv&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Installing R libraries hosted on private repositories.&lt;/li&gt;
&lt;li&gt;Building R libraries from source using &lt;code&gt;Makevars&lt;/code&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Let&amp;rsquo;s get started!&lt;/p&gt;</description>
    </item>
    <item>
      <title>Using data.table with OpenMP support</title>
      <link>https://firas.phd/posts/data_table_openmp/</link>
      <pubDate>Mon, 26 Apr 2021 00:00:00 +0000</pubDate>
      <guid>https://firas.phd/posts/data_table_openmp/</guid>
      <description>&lt;p&gt;If you are facing difficulties with large data sets in R, using &lt;code&gt;data.table&lt;/code&gt; could provide a performance boost. However, when loading &lt;code&gt;data.table&lt;/code&gt;, especially on macOS, you might encounter a warning indicating the absence of OpenMP support, causing &lt;code&gt;data.table&lt;/code&gt; to operate in a single-threaded mode. This limitation prevents you from fully utilizing the potential benefits of using &lt;code&gt;data.table&lt;/code&gt; and taking advantage of the underlying hardware.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-r&#34; data-lang=&#34;r&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nf&#34;&gt;library&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;data.table&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;data.table&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1.14.0&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt; &lt;span class=&#34;nf&#34;&gt;threads &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;see&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;?&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;getDTthreads&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;. &lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Latest&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;news&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;r&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;datatable.com&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;**********&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;This&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;installation&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;of&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;data.table&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;has&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;not&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;detected&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;OpenMP&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;support.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;It&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;should&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;still&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;work&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;but&lt;/span&gt; &lt;span class=&#34;kr&#34;&gt;in&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;single&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;-&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;threaded&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;mode.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;If&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;this&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;is&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Mac&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;please&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;ensure&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;you&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;are&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;using&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;R&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;&amp;gt;=&lt;/span&gt;&lt;span class=&#34;m&#34;&gt;3.4.0&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;and&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;have&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;followed&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;our&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Mac&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;instructions&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;here&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;:&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;https&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;://&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;github.com&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Rdatatable&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;data.table&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;wiki&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;/&lt;/span&gt;&lt;span class=&#34;n&#34;&gt;Installation.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 8&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;This&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;warning&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;message&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;should&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;not&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;occur&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;on&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Windows&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;or&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;Linux.&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;If&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;it&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;does&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;please&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;file&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;a&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;GitHub&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;issue.&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt; 9&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;o&#34;&gt;**********&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;10&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;11&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;nf&#34;&gt;getDTthreads&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;12&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;[1]&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&#34;what-is-the-issue-here&#34;&gt;What is the issue here?&lt;/h2&gt;
&lt;p&gt;OpenMP is an implementation of multithreading, and the Clang compiler that comes with Xcode on macOS lacks support for OpenMP. Apple has chosen not to include the &lt;code&gt;libomp.dylib&lt;/code&gt; run-time library in their compiler. You can verify this by executing the following command.&lt;/p&gt;</description>
    </item>
    <item>
      <title>macOS setup for data science</title>
      <link>https://firas.phd/posts/macos_setup/</link>
      <pubDate>Sun, 08 Oct 2017 12:00:00 +0000</pubDate>
      <guid>https://firas.phd/posts/macos_setup/</guid>
      <description>&lt;p&gt;Here, I summarise how I setup my macOS for the purpose of Data Science. Ultimately, I should invest some time into automating the process.&lt;/p&gt;
&lt;h3 id=&#34;install-command-line-developer-tools&#34;&gt;Install Command Line Developer Tools&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;xcode-select --install
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;install-homebrew&#34;&gt;Install HomeBrew&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;/usr/bin/ruby -e &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;turn-off-analytic-optional&#34;&gt;Turn off analytic (optional)&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;brew analytics off
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;install-iterm&#34;&gt;Install iTerm&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;brew install iterm
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;configure-iterm&#34;&gt;Configure iTerm&lt;/h3&gt;
&lt;p&gt;&lt;img alt=&#34;iTerm Configure1&#34; loading=&#34;lazy&#34; src=&#34;https://firas.phd/images/iTermConfig1.png&#34;&gt;
&lt;img alt=&#34;iTerm Configure2&#34; loading=&#34;lazy&#34; src=&#34;https://firas.phd/images/iTermConfig2.png&#34;&gt;
To download different colour schemes, visit &lt;a href=&#34;http://iterm2colorschemes.com/&#34;&gt;iTerm Themes&lt;/a&gt;
&lt;img alt=&#34;iTerm Configure3&#34; loading=&#34;lazy&#34; src=&#34;https://firas.phd/images/iTermConfig3.png&#34;&gt;&lt;/p&gt;
&lt;h3 id=&#34;install-go2sehll&#34;&gt;Install Go2Sehll&lt;/h3&gt;
&lt;p&gt;Download and install from &lt;a href=&#34;http://zipzapmac.com/go2shell&#34;&gt;Go2Shell&lt;/a&gt;, then configure it to work with iTerm:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Mounting remote drives locally using sshfs</title>
      <link>https://firas.phd/posts/macos_sshfs/</link>
      <pubDate>Tue, 29 Aug 2017 12:00:00 +0000</pubDate>
      <guid>https://firas.phd/posts/macos_sshfs/</guid>
      <description>&lt;p&gt;To mount a network drive as a local one, you can use sshfs.&lt;/p&gt;
&lt;h3 id=&#34;generate-ssh-key&#34;&gt;Generate SSH key&lt;/h3&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;1&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;$ mkdir ~/.ssh &lt;span class=&#34;c1&#34;&gt;#if it does not already exist&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;2&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;$ chmod &lt;span class=&#34;m&#34;&gt;700&lt;/span&gt; ~/.ssh
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;3&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;$ &lt;span class=&#34;nb&#34;&gt;cd&lt;/span&gt; ~/.ssh
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;4&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;$ ssh-keygen -t rsa
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;5&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;$ enter a keyname
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;6&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;$ enter a passphrase
&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;ln&#34;&gt;7&lt;/span&gt;&lt;span class=&#34;cl&#34;&gt;$ ssh-copy-id -i &lt;span class=&#34;o&#34;&gt;[&lt;/span&gt;path to rsa file&lt;span class=&#34;o&#34;&gt;]&lt;/span&gt; USER@SERVER
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Where &lt;code&gt;-i&lt;/code&gt; indicates where the rsa file is located. The .pub key is the one needed to be copied.&lt;/p&gt;
&lt;p&gt;[Optional] Start a SSH agent, and add the key to the SSH agent:&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
