snipt

Ctrl+h for KB shortcuts
Sign up for : store and share your own code snippets.
#138107

Bash

bugfix "Could not load host key /etc/ssh/ssh_host_..."

1
2
3
# error: Could not load host key: /etc/ssh/ssh_host_ed25519_key
# Regenerates any missing keys:
$ ssh-keygen -A
https://snipt.net/embed/6ac532ae5b57a28cfd810f876f7bb91f/
https://snipt.net/raw/6ac532ae5b57a28cfd810f876f7bb91f/
6ac532ae5b57a28cfd810f876f7bb91f
bash
Bash
4
2015-04-26T13:13:22
True
False
Feb 03, 2015 at 11:54 PM
/api/public/snipt/138107/
bugfix-could-not-load-host-key-etcsshssh_host_-7f87c683
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c"># error: Could not load host key: /etc/ssh/ssh_host_ed25519_key</span> </span><span id="L-2"><a name="L-2"></a><span class="c"># Regenerates any missing keys:</span> </span><span id="L-3"><a name="L-3"></a><span class="nv">$ </span>ssh-keygen -A </span></pre></div> </td></tr></table>
aws, linux, ssh, ssh-keygen, ubuntu
#138039

Bash

linux > check if username exists

$ id -u name
https://snipt.net/embed/067c62975fc052fa0821b7b3ae80a4c5/
https://snipt.net/raw/067c62975fc052fa0821b7b3ae80a4c5/
067c62975fc052fa0821b7b3ae80a4c5
bash
Bash
1
2015-04-27T19:41:45
True
False
Feb 03, 2015 at 07:45 PM
/api/public/snipt/138039/
linux-check-if-username-exists-bc795ca7
<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 id="L-1"><a name="L-1"></a><span class="nv">$ </span>id -u name </span></pre></div> </td></tr></table>
bash, linux, ubuntu
#137461

Bash

find and delete files older than 15 minutes

$ find /path/to/files/*.json -type f -mmin +15 -delete
https://snipt.net/embed/526b8c150780e8fd47ad7b0adaac0e65/
https://snipt.net/raw/526b8c150780e8fd47ad7b0adaac0e65/
526b8c150780e8fd47ad7b0adaac0e65
bash
Bash
1
2015-04-27T19:41:45
True
False
/api/public/snipt/137461/
find-and-delete-files-older-than-15-minutes-e01e1c63
<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 id="L-1"><a name="L-1"></a><span class="nv">$ </span>find /path/to/files/*.json -type f -mmin +15 -delete </span></pre></div> </td></tr></table>
bash, delete, find, linux
#136854

Bash

get entire folder via sftp

get -r *
https://snipt.net/embed/4181bf84de720b413ee400959a1322d2/
https://snipt.net/raw/4181bf84de720b413ee400959a1322d2/
4181bf84de720b413ee400959a1322d2
bash
Bash
1
2015-04-24T13:53:41
True
False
/api/public/snipt/136854/
get-entire-folder-via-sftp-ecec2af5
<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 id="L-1"><a name="L-1"></a>get -r * </span></pre></div> </td></tr></table>
copy, ftp, linux, sftp
#133013

Text only

Enable quick search in Lubuntu's Synaptic

sudo apt-get install apt-xapian-index
sudo apt-get --reinstall install synaptic
https://snipt.net/embed/1bc49db0adc7f34cd2e9fea5d6c0865c/
https://snipt.net/raw/1bc49db0adc7f34cd2e9fea5d6c0865c/
1bc49db0adc7f34cd2e9fea5d6c0865c
text
Text only
2
2015-04-26T07:53:46
True
True
Apr 25, 2014 at 11:41 PM
/api/public/snipt/133013/
enable-quick-search-in-lubuntus-synaptic-a50cc7e3
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>sudo apt-get install apt-xapian-index </span><span id="L-2"><a name="L-2"></a>sudo apt-get --reinstall install synaptic </span></pre></div> </td></tr></table>
linux, lubuntu, synaptic
Copyrighted, illegal, or inappropriate content? Email nick@snipt.net.