snipt

Ctrl+h for KB shortcuts

Bash

passwordless RSA ssh 1-liner

ssh [email protected] 'test -d .ssh || mkdir -m 0700 .ssh ; cat >> .ssh/authorized_keys && chmod 0600 .ssh/*' < ~/.ssh/id_rsa.pub 
https://snipt.net/embed/178d12a904d346f71a8fa2e42bcd66a8/
/raw/178d12a904d346f71a8fa2e42bcd66a8/
178d12a904d346f71a8fa2e42bcd66a8
bash
Bash
1
2019-08-02T05:54:53
True
False
False
/api/public/snipt/2170/
passwordless-rsa-ssh-1-liner
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>ssh [email protected] <span class="s1">&#39;test -d .ssh || mkdir -m 0700 .ssh ; cat &gt;&gt; .ssh/authorized_keys &amp;&amp; chmod 0600 .ssh/*&#39;</span> &lt; ~/.ssh/id_rsa.pub </span></pre></div> </td></tr></table>
passwordless, ssh

INI

passwordless access to mysql

1
2
3
4
#this should be in your ~/.my.cnf
[client]
user=root
password=<the password>
https://snipt.net/embed/138070396e31c714ba371c70285d5dda/
/raw/138070396e31c714ba371c70285d5dda/
138070396e31c714ba371c70285d5dda
ini
INI
4
2019-08-15T01:52:51
True
False
False
/api/public/snipt/422/
passwordless-access-to-mysql
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="c1">#this should be in your ~/.my.cnf</span> </span><span id="L-2"><a name="L-2"></a><span class="k">[client]</span> </span><span id="L-3"><a name="L-3"></a><span class="na">user</span><span class="o">=</span><span class="s">root</span> </span><span id="L-4"><a name="L-4"></a><span class="na">password</span><span class="o">=</span><span class="s">&lt;the password&gt;</span> </span></pre></div> </td></tr></table>
configuration, mysql, passwordless