<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ssh on Alex_Tech_Blog</title><link>https://alex.dinnouti.com/tags/ssh/</link><description>Recent content in Ssh on Alex_Tech_Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 18 Dec 2018 21:08:08 -0500</lastBuildDate><atom:link href="https://alex.dinnouti.com/tags/ssh/index.xml" rel="self" type="application/rss+xml"/><item><title>Automatic Login in SSH using config file</title><link>https://alex.dinnouti.com/posts/ssh-config/</link><pubDate>Tue, 18 Dec 2018 21:08:08 -0500</pubDate><guid>https://alex.dinnouti.com/posts/ssh-config/</guid><description>&lt;p&gt;Remembering tons of SSH hosts and respective signature files is hard. This is when the config file comes in place. Edit the file ~/.ssh/config.&lt;/p&gt;&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ vi ~/.ssh/config&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&#10;&lt;p&gt;Add the following:&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;Host server1&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; HostName server1.example.com&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; User root&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; Port &lt;span class="m"&gt;22&lt;/span&gt;&#10;&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt; IdentityFile ~/.ssh/test.pem&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;&#10;&lt;p&gt;Next time you try to login to the server:&#10;&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;$ ssh server1&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/p&gt;</description></item></channel></rss>