<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2FSSH</id>
	<title>Linux/SSH - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://aznot.com/index.php?action=history&amp;feed=atom&amp;title=Linux%2FSSH"/>
	<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/SSH&amp;action=history"/>
	<updated>2026-04-30T15:08:27Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://aznot.com/index.php?title=Linux/SSH&amp;diff=8539&amp;oldid=prev</id>
		<title>Kenneth: /* SSH v1 */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/SSH&amp;diff=8539&amp;oldid=prev"/>
		<updated>2025-04-03T21:53:57Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;SSH v1&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:53, 3 April 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l374&quot;&gt;Line 374:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 374:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Change password on private key:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Change password on private key:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ssh-keygen -p -f ~/.ssh/id_dsa&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ssh-keygen -p -f ~/.ssh/id_dsa&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== ed25519 key ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ed25519 key &amp;lt;ref&amp;gt;https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent&amp;lt;/ref&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ssh-keygen -t ed25519 -C &quot;your_email@example.com&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;This will generate:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ~/.ssh/id_ed25519&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ~/.ssh/id_ed25519.pub&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;The .pub will look like:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx your_comment&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the key will look like:&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-----BEGIN OPENSSH PRIVATE KEY-----&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;-----END OPENSSH PRIVATE KEY-----&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;/pre&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== RSA 4096 bit key ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;RSA 4096 bit key &amp;lt;ref&amp;gt;https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent&amp;lt;/ref&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ssh-keygen -t rsa -b 4096 -C &quot;your_email@example.com&quot;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== SSH v1 ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== SSH v1 ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key aznot:diff:1.41:old-7604:rev-8539:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
	<entry>
		<id>https://aznot.com/index.php?title=Linux/SSH&amp;diff=7604&amp;oldid=prev</id>
		<title>Kenneth: /* SSH Public Private Keys */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/SSH&amp;diff=7604&amp;oldid=prev"/>
		<updated>2024-07-10T01:03:10Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;SSH Public Private Keys&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 01:03, 10 July 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l274&quot;&gt;Line 274:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 274:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== SSH Public Private Keys ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== SSH Public Private Keys ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Generate key&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;:&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== &lt;/ins&gt;Generate key &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ssh-keygen&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ssh-keygen&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l292&quot;&gt;Line 292:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 293:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you copy keys to a Secure Linux system, you may need to fix the permissions:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;If you copy keys to a Secure Linux system, you may need to fix the permissions:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  restorecon -r -v ~/.ssh&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  restorecon -r -v ~/.ssh&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;=== Remove comment from private key ===&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Remove or change comment on private key: &amp;lt;ref&amp;gt;https://superuser.com/questions/361764/how-can-i-change-the-comment-field-of-an-rsa-key-ssh&amp;lt;/ref&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ssh-keygen -c -C &quot;my new comment&quot; -f ~/.ssh/my_ssh_key&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== ssh-copy-id ===&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;=== ssh-copy-id ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key aznot:diff:1.41:old-7039:rev-7604:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
	<entry>
		<id>https://aznot.com/index.php?title=Linux/SSH&amp;diff=7039&amp;oldid=prev</id>
		<title>Kenneth: /* keyscan */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/SSH&amp;diff=7039&amp;oldid=prev"/>
		<updated>2024-02-11T21:27:08Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;keyscan&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:27, 11 February 2024&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l260&quot;&gt;Line 260:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 260:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Remove previous key:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Remove previous key:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ssh-keygen -f /etc/ssh/ssh_known_hosts -R [HOST]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;  ssh-keygen -f /etc/ssh/ssh_known_hosts -R [HOST]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;== sha256 fingerprint ==&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Useful to compare on Github&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ssh-keygen -lf ~/.ssh/key_file.pub&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  (RSA)HA256:BYU902uUz+IqWXXXXXXXXXXXX some_comment&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt; ssh-keygen -lf ~/.ssh/key_file&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;  2048 SHA256:BYU902uUz+IqWXXXXXXXXXXXX no comment (RSA)&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ref: https://stackoverflow.com/questions/9607295/calculate-rsa-key-fingerprint&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== SSH Public Private Keys ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== SSH Public Private Keys ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key aznot:diff:1.41:old-5245:rev-7039:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
	<entry>
		<id>https://aznot.com/index.php?title=Linux/SSH&amp;diff=5245&amp;oldid=prev</id>
		<title>Kenneth: /* Keep Alive */</title>
		<link rel="alternate" type="text/html" href="https://aznot.com/index.php?title=Linux/SSH&amp;diff=5245&amp;oldid=prev"/>
		<updated>2019-12-10T23:50:09Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Keep Alive&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Secure Shell (SSH) ==&lt;br /&gt;
&lt;br /&gt;
:&amp;quot;Secure Shell or SSH is a network protocol that allows data to be exchanged over a secure channel between two computers. Encryption provides confidentiality and integrity of data. SSH uses public-key cryptography to authenticate the remote computer and allow the remote computer to authenticate the user, if necessary.&lt;br /&gt;
&lt;br /&gt;
:SSH is typically used to log into a remote machine and execute commands, but it also supports tunneling, forwarding arbitrary TCP ports and X11 connections; it can transfer files using the associated SFTP or SCP protocols.&lt;br /&gt;
&lt;br /&gt;
:An SSH server, by default, listens on the standard TCP port 22.&amp;quot; ([http://en.wikipedia.org/wiki/Ssh Wikipedia: SSH])&lt;br /&gt;
&lt;br /&gt;
== SSH Server ==&lt;br /&gt;
&lt;br /&gt;
See [[sshd]]&lt;br /&gt;
&lt;br /&gt;
== Tunneling ==&lt;br /&gt;
&lt;br /&gt;
NOTE: Only TCP ports can be tunneled&lt;br /&gt;
&lt;br /&gt;
Allow Tunneling on server:&lt;br /&gt;
 /etc/ssh/sshd_config&lt;br /&gt;
 AllowTcpForwarding yes&lt;br /&gt;
&lt;br /&gt;
Tunnel&lt;br /&gt;
 # ssh -L [localport]:[server]:[serverport] [user]@[host]&lt;br /&gt;
 &lt;br /&gt;
 # Forward local 8000 to remote VNC port&lt;br /&gt;
 ssh -L 8000:localhost:5900 kenneth@t0e.org&lt;br /&gt;
 ssh -L 8000:localhost:5900 -L 8001:localhost:5901 kenneth@t0e.org  # multiple forwards&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
 -L port:host:hostport &lt;br /&gt;
   Specifies that the given port on the local (client) host is to be &lt;br /&gt;
   forwarded to the given host and port on the remote side.&lt;br /&gt;
 -N&lt;br /&gt;
   Do not execute a remote command.  This is useful for just forwarding&lt;br /&gt;
   ports (protocol version 2 only). &lt;br /&gt;
&lt;br /&gt;
To allow other external systems to use the tunnel:&lt;br /&gt;
 ssh -L *:8000:winserver:3389 kenneth@t0e.org&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* SSH Tunneling http://www.linux-mag.com/id/1705&lt;br /&gt;
&lt;br /&gt;
=== Add Forward to Live Connection ===&lt;br /&gt;
&lt;br /&gt;
Open the SSH command line, using special SSH key:&lt;br /&gt;
 ~C  - open a command line&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh&amp;gt; help&lt;br /&gt;
Commands:&lt;br /&gt;
      -Lport:host:hostport    Request local forward&lt;br /&gt;
      -Rport:host:hostport    Request remote forward&lt;br /&gt;
      -KRhostport             Cancel remote forward&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== List Forwarded Connections ===&lt;br /&gt;
&lt;br /&gt;
SSH special key:&lt;br /&gt;
 ~#  - list forwarded connections&lt;br /&gt;
&lt;br /&gt;
This will list each client connection that is being forwarded (not the actual forward tunnels themselves)&lt;br /&gt;
&lt;br /&gt;
=== Reverse Tunnel ===&lt;br /&gt;
&lt;br /&gt;
Tunnel&lt;br /&gt;
 # ssh -R [bind_address:]port:host:hostport [user]@[host]&lt;br /&gt;
&lt;br /&gt;
 # Reverse forward port 8000 to local HTTP port&lt;br /&gt;
 ssh -R *:8000:localhost:80 root@216.119.194.247&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
 -R [bind_address:]port:host:hostport&lt;br /&gt;
   Specifies that the given port on the remote (server) host is to&lt;br /&gt;
   be forwarded to the given host and port on the local side.&lt;br /&gt;
&lt;br /&gt;
   By default, the listening socket on the server will be bound to&lt;br /&gt;
   the loopback interface only.  This may be overriden by specifying&lt;br /&gt;
   a bind_address.  An empty bind_address, or the address ‘*’, indi-&lt;br /&gt;
   cates that the remote socket should listen on all interfaces.&lt;br /&gt;
   Specifying a remote bind_address will only succeed if the&lt;br /&gt;
   server’s GatewayPorts option is enabled (see sshd_config(5)).&lt;br /&gt;
&lt;br /&gt;
Allow remote bind to any address: /etc/ssh/sshd_config&lt;br /&gt;
 #GatewayPorts no&lt;br /&gt;
 GatewayPorts yes&lt;br /&gt;
&lt;br /&gt;
=== Tunnel Command Mode ===&lt;br /&gt;
&lt;br /&gt;
ssh man:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
     ~C      Open command line.  Currently this allows the addition of port forwardings using the -L and -R options (see above).&lt;br /&gt;
             It also allows the cancellation of existing remote port-forwardings using -KR hostport.  !command allows the user to&lt;br /&gt;
             execute a local command if the PermitLocalCommand option is enabled in ssh_config(5).  Basic help is available, using&lt;br /&gt;
             the -h option.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
command mode:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh&amp;gt; help&lt;br /&gt;
Commands:&lt;br /&gt;
      -Lport:host:hostport    Request local forward&lt;br /&gt;
      -Rport:host:hostport    Request remote forward&lt;br /&gt;
      -KRhostport             Cancel remote forward&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== X Forwarding ===&lt;br /&gt;
&lt;br /&gt;
/etc/ssh/ssh_config or ~/.ssh/config:&lt;br /&gt;
 ForwardX11 yes&lt;br /&gt;
&lt;br /&gt;
/etc/ssh/sshd_config:&lt;br /&gt;
 X11Forwarding yes&lt;br /&gt;
 X11DisplayOffset 10&lt;br /&gt;
&lt;br /&gt;
Client:&lt;br /&gt;
 ssh -o ForwardX11=yes some-user@the-server&lt;br /&gt;
 # or&lt;br /&gt;
 ssh -X some-user@the-server&lt;br /&gt;
&lt;br /&gt;
Ref: https://unix.stackexchange.com/questions/12755/how-to-forward-x-over-ssh-to-run-graphics-applications-remotely&lt;br /&gt;
&lt;br /&gt;
==== Putty X11 Forwarding ====&lt;br /&gt;
&lt;br /&gt;
 Connection → SSH → X11 → Enable X11 forwarding&lt;br /&gt;
&lt;br /&gt;
==== Xming ====&lt;br /&gt;
&lt;br /&gt;
Ref: https://aruljohn.com/info/x11forwarding/&lt;br /&gt;
&lt;br /&gt;
== Disconnect ==&lt;br /&gt;
&lt;br /&gt;
To force a disconnect (Force SSH connection closed):&lt;br /&gt;
 ~.&lt;br /&gt;
&lt;br /&gt;
== Escape Characters ==&lt;br /&gt;
&lt;br /&gt;
man ssh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ESCAPE CHARACTERS&lt;br /&gt;
     When a pseudo-terminal has been requested, ssh supports a number of func-&lt;br /&gt;
     tions through the use of an escape character.&lt;br /&gt;
&lt;br /&gt;
     A single tilde character can be sent as ~~ or by following the tilde by a&lt;br /&gt;
     character other than those described below.  The escape character must&lt;br /&gt;
     always follow a newline to be interpreted as special.  The escape charac-&lt;br /&gt;
     ter can be changed in configuration files using the EscapeChar configura-&lt;br /&gt;
     tion directive or on the command line by the -e option.&lt;br /&gt;
&lt;br /&gt;
     The supported escapes (assuming the default &amp;#039;~&amp;#039;) are:&lt;br /&gt;
&lt;br /&gt;
     ~.      Disconnect.&lt;br /&gt;
&lt;br /&gt;
     ~^Z     Background ssh.&lt;br /&gt;
&lt;br /&gt;
     ~#      List forwarded connections.&lt;br /&gt;
&lt;br /&gt;
     ~&amp;amp;      Background ssh at logout when waiting for forwarded connection /&lt;br /&gt;
             X11 sessions to terminate.&lt;br /&gt;
&lt;br /&gt;
     ~?      Display a list of escape characters.&lt;br /&gt;
&lt;br /&gt;
     ~B      Send a BREAK to the remote system (only useful for SSH protocol&lt;br /&gt;
             version 2 and if the peer supports it).&lt;br /&gt;
&lt;br /&gt;
     ~C      Open command line.  Currently this allows the addition of port&lt;br /&gt;
             forwardings using the -L and -R options (see above).  It also&lt;br /&gt;
             allows the cancellation of existing remote port-forwardings using&lt;br /&gt;
             -KR hostport.  !command allows the user to execute a local com-&lt;br /&gt;
             mand if the PermitLocalCommand option is enabled in&lt;br /&gt;
             ssh_config(5).  Basic help is available, using the -h option.&lt;br /&gt;
&lt;br /&gt;
     ~R      Request rekeying of the connection (only useful for SSH protocol&lt;br /&gt;
             version 2 and if the peer supports it).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Note: If you are double connected, you can send ~~. to exit the second connection only.&lt;br /&gt;
&lt;br /&gt;
== Escape Characters ==&lt;br /&gt;
&lt;br /&gt;
man ssh:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ESCAPE CHARACTERS&lt;br /&gt;
     When a pseudo-terminal has been requested, ssh supports a number of functions through the use of an escape character.&lt;br /&gt;
&lt;br /&gt;
     A single tilde character can be sent as ~~ or by following the tilde by a character other than those described below.  The&lt;br /&gt;
     escape character must always follow a newline to be interpreted as special.  The escape character can be changed in configu-&lt;br /&gt;
     ration files using the EscapeChar configuration directive or on the command line by the -e option.&lt;br /&gt;
&lt;br /&gt;
     The supported escapes (assuming the default ‘~’) are:&lt;br /&gt;
&lt;br /&gt;
     ~.      Disconnect.&lt;br /&gt;
&lt;br /&gt;
     ~^Z     Background ssh.&lt;br /&gt;
&lt;br /&gt;
     ~#      List forwarded connections.&lt;br /&gt;
&lt;br /&gt;
     ~&amp;amp;      Background ssh at logout when waiting for forwarded connection / X11 sessions to terminate.&lt;br /&gt;
&lt;br /&gt;
     ~?      Display a list of escape characters.&lt;br /&gt;
&lt;br /&gt;
     ~B      Send a BREAK to the remote system (only useful for SSH protocol version 2 and if the peer supports it).&lt;br /&gt;
&lt;br /&gt;
     ~C      Open command line.  Currently this allows the addition of port forwardings using the -L and -R options (see above).&lt;br /&gt;
             It also allows the cancellation of existing remote port-forwardings using -KR hostport.  !command allows the user to&lt;br /&gt;
             execute a local command if the PermitLocalCommand option is enabled in ssh_config(5).  Basic help is available, using&lt;br /&gt;
             the -h option.&lt;br /&gt;
&lt;br /&gt;
     ~R      Request rekeying of the connection (only useful for SSH protocol version 2 and if the peer supports it).&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== rsync and SSH ==&lt;br /&gt;
&lt;br /&gt;
See [[rsync#SSH]]&lt;br /&gt;
&lt;br /&gt;
== User Config ==&lt;br /&gt;
&lt;br /&gt;
per-user configuration file is ~/.ssh/config&lt;br /&gt;
&lt;br /&gt;
== SSH Default User ==&lt;br /&gt;
&lt;br /&gt;
~/.ssh/config&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host myserver&lt;br /&gt;
  user bob&lt;br /&gt;
Host *&lt;br /&gt;
  user jenkins&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host gh-foo&lt;br /&gt;
    Hostname github.com&lt;br /&gt;
    User git&lt;br /&gt;
    IdentityFile ~/.ssh/foo_github_id&lt;br /&gt;
Host gh-bar&lt;br /&gt;
    Hostname github.com&lt;br /&gt;
    User git&lt;br /&gt;
    IdentityFile ~/.ssh/bar_github_id&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== keyscan ==&lt;br /&gt;
&lt;br /&gt;
Collect host key: (should check first if it is already there)&lt;br /&gt;
 ssh-keyscan -t rsa [HOST] &amp;gt;&amp;gt; /etc/ssh/ssh_known_hosts&lt;br /&gt;
 ssh-keyscan -t rsa [HOST] &amp;gt;&amp;gt; ~/.ssh/known_hosts [HOST]&lt;br /&gt;
&lt;br /&gt;
Types: &amp;quot;Specifies the type of the key to fetch from the scanned hosts. The possible values are “rsa1” for protocol version 1 and “rsa” or “dsa” for protocol version 2.  Multiple values may be specified by separating them with commas.  The default is “rsa1”.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Print the rsa1 host key for machine hostname:&lt;br /&gt;
&lt;br /&gt;
 $ ssh-keyscan hostname&lt;br /&gt;
&lt;br /&gt;
Print the rsa2 host key for machine hostname:&lt;br /&gt;
&lt;br /&gt;
 $ ssh-keyscan -t rsa hostname&lt;br /&gt;
&lt;br /&gt;
Find all hosts from the file ssh_hosts which have new or different keys from those in the sorted file ssh_known_hosts:&lt;br /&gt;
&lt;br /&gt;
 $ ssh-keyscan -t rsa,dsa -f ssh_hosts | \&lt;br /&gt;
   sort -u - ssh_known_hosts | diff ssh_known_hosts -&lt;br /&gt;
&lt;br /&gt;
Remove previous key:&lt;br /&gt;
 ssh-keygen -f /etc/ssh/ssh_known_hosts -R [HOST]&lt;br /&gt;
&lt;br /&gt;
== SSH Public Private Keys ==&lt;br /&gt;
&lt;br /&gt;
Generate key:&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
&lt;br /&gt;
Get public key from private key file:&lt;br /&gt;
 ssh-keygen -y -f id_rsa &amp;gt; id_rsa.pub&lt;br /&gt;
&lt;br /&gt;
Get hash from public key:&lt;br /&gt;
 ssh-keygen -l -f id_rsa.pub&lt;br /&gt;
&lt;br /&gt;
Remote server authenticated keys are stored in:&lt;br /&gt;
 .ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
To avoid the No identities error: &lt;br /&gt;
 # /usr/bin/ssh-copy-id: ERROR: No identities found&lt;br /&gt;
 ln -s id_rsa.pub ~/.ssh/identity.pub&lt;br /&gt;
&lt;br /&gt;
If you copy keys to a Secure Linux system, you may need to fix the permissions:&lt;br /&gt;
 restorecon -r -v ~/.ssh&lt;br /&gt;
&lt;br /&gt;
=== ssh-copy-id ===&lt;br /&gt;
&lt;br /&gt;
Copy key to remote server:&lt;br /&gt;
 ssh-copy-id [USER]@[REMOTE_SERVER]&lt;br /&gt;
 ssh-copy-id -i ~/.ssh/id_rsa.pub [USER]@[REMOTE_SERVER]&lt;br /&gt;
 ssh-copy-id &amp;quot;[USER]@[REMOTE_SERVER] -p [PORT]&amp;quot;   # if on a different port&lt;br /&gt;
&lt;br /&gt;
=== Extract Public Key from Private Key ===&lt;br /&gt;
&lt;br /&gt;
 ssh-keygen -y  # enter private key filename when asked&lt;br /&gt;
   ssh-rsa AAA.....AAA my-key-pair&lt;br /&gt;
&lt;br /&gt;
 ssh-keygen -y -f private.pem&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* Amazon EC2 Key Pairs - Amazon Elastic Compute Cloud - http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html&lt;br /&gt;
&lt;br /&gt;
=== Key Location ===&lt;br /&gt;
&lt;br /&gt;
Default Location:&lt;br /&gt;
 ~/.ssh/id_rsa    # ver 2&lt;br /&gt;
 ~/.ssh/id_dsa    # ver 2&lt;br /&gt;
 ~/.ssh/identity  # ver 1&lt;br /&gt;
&lt;br /&gt;
Specify alternate location:&lt;br /&gt;
 ssh -i [PATH_TO_KEY] user@host&lt;br /&gt;
&lt;br /&gt;
Setting the default ssh key location - Stack Overflow - http://stackoverflow.com/questions/84096/setting-the-default-ssh-key-location&lt;br /&gt;
&lt;br /&gt;
Method #1: add the keys from the non-standard location to the agent&lt;br /&gt;
 ssh-agent&lt;br /&gt;
 ssh-add /path/to/where/keys/really/are/id_rsa&lt;br /&gt;
&lt;br /&gt;
Method #2: ~/.ssh/config file (man ssh_config to find other config options)&lt;br /&gt;
 IdentityFile ~/.foo/identity&lt;br /&gt;
&lt;br /&gt;
 Host *&lt;br /&gt;
 IdentityFile ~/.foo/identity&lt;br /&gt;
&lt;br /&gt;
Method #3: alias:&lt;br /&gt;
 alias ssh=&amp;quot;ssh -i /path/to/private_key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Notes ===&lt;br /&gt;
&lt;br /&gt;
&amp;quot;As there exists two version of the SSH protocol, version 1 and 2, the identities are tied to the protocol version. Most SSH-servers use version 2 of the protocol due to the limitations of version 1.&amp;quot; [http://gentoo-wiki.com/SECURITY_SSH_without_a_password]&lt;br /&gt;
&lt;br /&gt;
Key Protocols:&lt;br /&gt;
 Protocol	Type	Commandline&lt;br /&gt;
 Version 1	RSA1	-t rsa1&lt;br /&gt;
 Version 2	RSA	-t rsa&lt;br /&gt;
 Version 2	DSA	-t dsa&lt;br /&gt;
&lt;br /&gt;
Key Generation:&lt;br /&gt;
 ssh-keygen -t dsa&lt;br /&gt;
&lt;br /&gt;
Generated files: (~/.ssh/)&lt;br /&gt;
 -rw-------   1 bob users   668 Jun 17 23:52 id_dsa&lt;br /&gt;
 -rw-r--r--   1 bob users   602 Jun 17 23:52 id_dsa.pub&lt;br /&gt;
&lt;br /&gt;
Copy public key to remote server:&lt;br /&gt;
 ssh-copy-id -i ~/.ssh/id_dsa.pub username@remotebox&lt;br /&gt;
&lt;br /&gt;
Alternate copy method: [http://www.oreilly.com/pub/h/66]&lt;br /&gt;
 ssh server &amp;quot;mkdir .ssh; chmod 0700 .ssh&amp;quot;&lt;br /&gt;
 $ scp .ssh/id_dsa.pub server:.ssh/authorized_keys2&lt;br /&gt;
&lt;br /&gt;
Server configuration (/etc/ssh/sshd_config):&lt;br /&gt;
 # Allow Identity Auth for SSH1?&lt;br /&gt;
 RSAAuthentication yes&lt;br /&gt;
 &lt;br /&gt;
 # Allow Identity Auth for SSH2?&lt;br /&gt;
 PubkeyAuthentication yes&lt;br /&gt;
&lt;br /&gt;
Change password on private key:&lt;br /&gt;
 ssh-keygen -p -f ~/.ssh/id_dsa&lt;br /&gt;
&lt;br /&gt;
=== SSH v1 ===&lt;br /&gt;
&lt;br /&gt;
Generate your skey (on connecting host):&lt;br /&gt;
 ssh-keygen&lt;br /&gt;
&lt;br /&gt;
Append your public key to the ~/.ssh/authorized_keys file in the remote machine:&lt;br /&gt;
 ssh user@remote test -d \~/.ssh \|\| mkdir \~/.ssh \; cat \&amp;gt;\&amp;gt; \~/.ssh/authorized_keys &amp;lt;~/.ssh/id_rsa.pub&lt;br /&gt;
&lt;br /&gt;
You can also use &amp;quot;ssh-copy-id&amp;quot; for this task.&lt;br /&gt;
&lt;br /&gt;
Reference: [http://wiki.freaks-unidos.net/ssh%20without%20password ssh without password]:&lt;br /&gt;
&lt;br /&gt;
Full Reference: [http://www.sshkeychain.org/mirrors/SSH-with-Keys-HOWTO/SSH with Keys HOWTO]&lt;br /&gt;
&lt;br /&gt;
=== SSH v2 ===&lt;br /&gt;
&lt;br /&gt;
Generate your skey (on connecting host):&lt;br /&gt;
 ssh-keygen -t rsa&lt;br /&gt;
 ssh-keygen -t dsa&lt;br /&gt;
&lt;br /&gt;
Copy public key to server:&lt;br /&gt;
 # copy to server&lt;br /&gt;
 scp .ssh/id_rsa.pub kenneth@server:~/&lt;br /&gt;
 # connect to server&lt;br /&gt;
 scp kenneth@server.com&lt;br /&gt;
 &lt;br /&gt;
 # create and set permissions&lt;br /&gt;
 mkdir .ssh ; chmod 700 .ssh&lt;br /&gt;
 touch .ssh/authorized_keys2 ; chmod 600 .ssh/authorized_keys2&lt;br /&gt;
 # copy to authorized&lt;br /&gt;
 cat id_rsa.pub &amp;gt;&amp;gt; .ssh/authorized_keys2&lt;br /&gt;
 &lt;br /&gt;
 # test force version 2 with verbose&lt;br /&gt;
 ssh -2 -v kenneth@server&lt;br /&gt;
&lt;br /&gt;
Reference: [http://www.sshkeychain.org/mirrors/SSH-with-Keys-HOWTO/SSH-with-Keys-HOWTO-4.html SSH with Keys in a console window]&lt;br /&gt;
&lt;br /&gt;
Full Reference: [http://www.sshkeychain.org/mirrors/SSH-with-Keys-HOWTO/SSH with Keys HOWTO]&lt;br /&gt;
&lt;br /&gt;
=== SSH Keys Example ===&lt;br /&gt;
&lt;br /&gt;
* One time only make yourself an SSH1 key with no passphrase.&lt;br /&gt;
 ssh-keygen -t rsa1&lt;br /&gt;
&lt;br /&gt;
This command makes two files: ~/.ssh/identity and ~/.ssh/identity.pub.&lt;br /&gt;
* Append your public identity to your autorized keys list.&lt;br /&gt;
 cat ~/.ssh/identity.pub &amp;gt;&amp;gt; ~/.ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
* Set permissions so nobody else can access these files (except root)&lt;br /&gt;
 chmod go-rwx .ssh&lt;br /&gt;
 chmod go-rwx .ssh/authorized_keys&lt;br /&gt;
&lt;br /&gt;
* Edit ~/.ssh/authorized_keys by prepending command=&amp;quot;cvs server&amp;quot; plus one space at the front of the top line so it looks like:&lt;br /&gt;
 command=&amp;quot;cvs server&amp;quot; 1024 &amp;lt;rest-of-key&amp;gt;&lt;br /&gt;
&lt;br /&gt;
NOTE: If you trust the superusers, you don&amp;#039;t need to do this step, and SSH and all associated commands (sftp, scp, cvs, etc) will never ask you for a password. Your choice.&lt;br /&gt;
* Copy the ~/.ssh/identity file to each client you want to run cvs commands from.&lt;br /&gt;
 cvs -d :ext:&amp;lt;username&amp;gt;@denali.cse.nau.edu:/research/cvsroot/ checkout &amp;lt;repository-name&amp;gt;&lt;br /&gt;
&lt;br /&gt;
on the client when you want to check out code.&lt;br /&gt;
* You don&amp;#039;t need ~/.ssh/identity. Delete it if you don&amp;#039;t want to copy it to other computers.&lt;br /&gt;
&lt;br /&gt;
NOTE:As long as ~/.ssh/identity exists on remote computers, SSH uses it by default, and will let you run CVS commands without entering a password.&lt;br /&gt;
&lt;br /&gt;
(Notes from: http://ccl.cens.nau.edu/CCL/Help/cvs.html)&lt;br /&gt;
&lt;br /&gt;
== Convert an ssh2 public key to openssh format ==&lt;br /&gt;
&lt;br /&gt;
Convert SSH2 key to OpenSSH key:&lt;br /&gt;
 ssh-keygen -i -f ~/.ssh/id_dsa_1024_a.pub &amp;gt; ~/.ssh/id_dsa_1024_a_openssh.pub&lt;br /&gt;
 ssh-keygen -i -f [SSH2_KEY_FILE] &amp;gt;&amp;gt; authorized_keys&lt;br /&gt;
&lt;br /&gt;
Convert OpenSSH key to SSH2 key&lt;br /&gt;
 ssh-keygen -e -f ~/.ssh/id_dsa.pub &amp;gt; ~/.ssh/id_dsa_ssh2.pub&lt;br /&gt;
&lt;br /&gt;
 —- BEGIN SSH2 PUBLIC KEY —-&lt;br /&gt;
 ...&lt;br /&gt;
 —- END SSH2 PUBLIC KEY —&lt;br /&gt;
References:&lt;br /&gt;
* Convert an ssh2 public key to openssh format | commandlinefu.com - http://www.commandlinefu.com/commands/view/155/convert-an-ssh2-public-key-to-openssh-format&lt;br /&gt;
* SSH Public-Key Authentication HOWTO - https://hkn.eecs.berkeley.edu/~dhsu/ssh_public_key_howto.html&lt;br /&gt;
* SSH: Convert OpenSSH to SSH2 and vise versa « //burnz.blog - http://burnz.wordpress.com/2007/12/14/ssh-convert-openssh-to-ssh2-and-vise-versa/&lt;br /&gt;
&lt;br /&gt;
== ssh_config ==&lt;br /&gt;
&lt;br /&gt;
Several options can be set as default for a host by placing the host in your .ssh/config file:&lt;br /&gt;
 ~/.ssh/config&lt;br /&gt;
&lt;br /&gt;
To create:&lt;br /&gt;
 touch ~/.ssh/config&lt;br /&gt;
 chmod 600 ~/.ssh/config&lt;br /&gt;
&lt;br /&gt;
Example config:&lt;br /&gt;
 Host server1&lt;br /&gt;
 HostName example.dyndns.org&lt;br /&gt;
 Port 12022&lt;br /&gt;
 &lt;br /&gt;
 Host server2&lt;br /&gt;
 HostName 192.168.1.15&lt;br /&gt;
&lt;br /&gt;
This would allow you to connect using &amp;quot;ssh server1&amp;quot; and &amp;quot;ssh server2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;quot;These are just a few of the options that you can set in ssh&amp;#039;s config file. You can also, for example, specify that X11 forwarding be enabled. You can set up local and remote port forwarding (i.e. ssh&amp;#039;s -L  and -R command line options, respectively). Take a look at the man page (man ssh_config) for more information on the available options.&lt;br /&gt;
&lt;br /&gt;
One of the added benefits of using ssh&amp;#039;s config file is that programs like scp, rsync, and rdiff-backup automatically pick up these options also and work just as you&amp;#039;d expect (hope).&amp;quot;&lt;br /&gt;
&lt;br /&gt;
More information:&lt;br /&gt;
 man ssh_config&lt;br /&gt;
&lt;br /&gt;
Source: [http://www.linuxjournal.com/content/use-sshconfig-simplify-your-life Use ssh_config To Simplify Your Life | Linux Journal]&lt;br /&gt;
&lt;br /&gt;
== SSH Key Forwarding ==&lt;br /&gt;
&lt;br /&gt;
Start agent:&lt;br /&gt;
 ssh-agent /bin/bash&lt;br /&gt;
 ssh-add&lt;br /&gt;
&lt;br /&gt;
Note: if you don&amp;#039;t specify &amp;#039;ssh-agent /bin/bash&amp;#039; you may get a &amp;quot;Could not open a connection to your authentication agent&amp;quot; error when you try ssh-add. [http://linuxindetails.wordpress.com/2010/06/07/could-not-open-a-connection-to-your-authentication-agent/]&lt;br /&gt;
&lt;br /&gt;
Or tricky version:&lt;br /&gt;
 ssh-agent sh -c &amp;#039;ssh-add &amp;lt; /dev/null &amp;amp;&amp;amp; bash&amp;#039;&lt;br /&gt;
&lt;br /&gt;
Forward agent through config /etc/ssh/ssh_config&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Host *&lt;br /&gt;
  ForwardAgent no&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Forward agent through parameter:&lt;br /&gt;
 ssh -A user@server&lt;br /&gt;
&lt;br /&gt;
Note: when you ssh into another server, and then want to ssh into yet another, make sure to forward the agent again if you will need to forward to yet another server.&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* An Illustrated Guide to SSH Agent Forwarding - http://unixwiz.net/techtips/ssh-agent-forwarding.html&lt;br /&gt;
* SSH and ssh-agent | Symantec Connect Community - http://www.symantec.com/connect/articles/ssh-and-ssh-agent&lt;br /&gt;
* SSH public-key forwarding at Xaprb - http://www.xaprb.com/blog/2006/03/30/ssh-public-key-forwarding/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== No Host Verification ==&lt;br /&gt;
&lt;br /&gt;
/etc/ssh/ssh_config:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
# to not prompt&lt;br /&gt;
StrictHostKeyChecking no&lt;br /&gt;
# to not store keys&lt;br /&gt;
UserKnownHostsFile /dev/null&lt;br /&gt;
# do not display warnings&lt;br /&gt;
LogLevel=ERROR&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Via command line:&lt;br /&gt;
 ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no peter@192.168.0.100&lt;br /&gt;
&lt;br /&gt;
Default:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
####### StrictHostKeyChecking&lt;br /&gt;
#&lt;br /&gt;
# If this flag is set to &amp;quot;yes&amp;quot;, ssh will never automatically add&lt;br /&gt;
# host keys to the $HOME/.ssh/known_hosts and&lt;br /&gt;
# $HOME/.ssh/known_hosts2 files, and refuses to connect to hosts&lt;br /&gt;
# whose host key has changed. This provides maximum protection&lt;br /&gt;
# against trojan horse attacks. However, it can be somewhat annoy-&lt;br /&gt;
# ing if you don&amp;quot;t have good /etc/ssh_known_hosts and&lt;br /&gt;
# /etc/ssh_known_hosts2 files installed and frequently connect to&lt;br /&gt;
# new hosts. This option forces the user to manually add all new&lt;br /&gt;
# hosts. If this flag is set to &amp;quot;no&amp;quot;, ssh will automatically add&lt;br /&gt;
# new host keys to the user known hosts files. If this flag is set&lt;br /&gt;
# to &amp;quot;ask&amp;quot;, new host keys will be added to the user known host&lt;br /&gt;
# files only after the user has confirmed that is what they really&lt;br /&gt;
# want to do, and ssh will refuse to connect to hosts whose host&lt;br /&gt;
# key has changed. The host keys of known hosts will be verified&lt;br /&gt;
# automatically in all cases. The argument must be &amp;quot;yes&amp;quot;, &amp;quot;no&amp;quot;&lt;br /&gt;
# or &amp;quot;ask&amp;quot;. The default is &amp;quot;ask&amp;quot;.&lt;br /&gt;
#&lt;br /&gt;
StrictHostKeyChecking ask&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you want to supress all warnings (and errors, including could not resolve hostname):&lt;br /&gt;
 ssh -q ...&lt;br /&gt;
 ssh -o LogLevel=quiet ...&lt;br /&gt;
 alias ssh=&amp;quot;ssh -o LogLevel=ERROR&amp;quot;  # best&lt;br /&gt;
&lt;br /&gt;
Or add to /etc/ssh/ssh_config: [http://www.gossamer-threads.com/lists/openssh/users/45539] [http://superuser.com/questions/141344/ssh-dont-add-hostkey-to-known-hosts/540808]&lt;br /&gt;
 LogLevel=ERROR&lt;br /&gt;
&lt;br /&gt;
For example, the following prints out the gcc version installed on machine.example.org (and no warning): [http://stackoverflow.com/questions/9299651/annoying-warning-permanently-added-to-list-of-known-hosts-message-from-git]&lt;br /&gt;
 ssh -o UserKnownHostsFile=/dev/null \&lt;br /&gt;
    -o StrictHostKeyChecking=no \&lt;br /&gt;
    -o LogLevel=quiet \&lt;br /&gt;
    -i identity_file \&lt;br /&gt;
    machine.example.org \&lt;br /&gt;
    gcc -dumpversion&lt;br /&gt;
&lt;br /&gt;
Or use this tricky wrapper script: [http://stackoverflow.com/questions/9299651/annoying-warning-permanently-added-to-list-of-known-hosts-message-from-git]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
remove=&amp;quot;^Warning: Permanently added&amp;quot; # message to remove from output&lt;br /&gt;
&lt;br /&gt;
cmd=${0##*/}&lt;br /&gt;
&lt;br /&gt;
case $cmd in&lt;br /&gt;
 ssh)&lt;br /&gt;
  binary=/usr/bin/ssh&lt;br /&gt;
 ;;&lt;br /&gt;
 *)&lt;br /&gt;
  echo &amp;quot;unsupported binary ($0)&amp;quot;&lt;br /&gt;
  exit&lt;br /&gt;
 ;;&lt;br /&gt;
esac&lt;br /&gt;
$binary &amp;quot;$@&amp;quot; 2&amp;gt;&amp;amp;1 | grep -v &amp;quot;$remove&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Keep Alive ==&lt;br /&gt;
&lt;br /&gt;
 ssh -o ServerAliveInterval=30 root@myhost&lt;br /&gt;
&lt;br /&gt;
[--&lt;br /&gt;
&lt;br /&gt;
It&amp;#039;s possible that your server closes connections that are idle for too long. You can update either your client (ServerAliveInterval) or your server (ClientAliveInterval)&lt;br /&gt;
&lt;br /&gt;
 ServerAliveInterval&lt;br /&gt;
         Sets a timeout interval in seconds after which if no data has&lt;br /&gt;
         been received from the server, ssh(1) will send a message through&lt;br /&gt;
         the encrypted channel to request a response from the server.  The&lt;br /&gt;
         default is 0, indicating that these messages will not be sent to&lt;br /&gt;
         the server.  This option applies to protocol version 2 only.&lt;br /&gt;
&lt;br /&gt;
 ClientAliveInterval&lt;br /&gt;
         Sets a timeout interval in seconds after which if no data has&lt;br /&gt;
         been received from the client, sshd(8) will send a message&lt;br /&gt;
         through the encrypted channel to request a response from the&lt;br /&gt;
         client.  The default is 0, indicating that these messages will&lt;br /&gt;
         not be sent to the client.  This option applies to protocol&lt;br /&gt;
         version 2 only.&lt;br /&gt;
&lt;br /&gt;
To update your server (and restart your sshd)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;ClientAliveInterval 60&amp;quot; | sudo tee -a /etc/ssh/sshd_config&lt;br /&gt;
&lt;br /&gt;
Or client-side:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;ServerAliveInterval 60&amp;quot; &amp;gt;&amp;gt; ~/.ssh/config &lt;br /&gt;
&lt;br /&gt;
--]&lt;br /&gt;
&lt;br /&gt;
Source: What does the Broken pipe message mean in an SSH session? - Unix and Linux - Stack Exchange - http://unix.stackexchange.com/questions/2010/what-does-the-broken-pipe-message-mean-in-an-ssh-session&lt;br /&gt;
&lt;br /&gt;
== sshpass ==&lt;br /&gt;
&lt;br /&gt;
 # password in history:&lt;br /&gt;
 sshpass -p &amp;quot;password&amp;quot; scp -r user@example.com:/some/remote/path /some/local/path&lt;br /&gt;
&lt;br /&gt;
 # password not in bash history:&lt;br /&gt;
 sshpass -f &amp;quot;/path/to/passwordfile&amp;quot; scp -r user@example.com:/some/remote/path /some/local/path&lt;br /&gt;
&lt;br /&gt;
ref: [https://stackoverflow.com/questions/50096/how-to-pass-password-to-scp]&lt;br /&gt;
&lt;br /&gt;
== SSH-D Proxy ==&lt;br /&gt;
&lt;br /&gt;
SSH SOCKS Proxy (DSOCKS)&lt;br /&gt;
&lt;br /&gt;
=== Keey Proxy Alive ===&lt;br /&gt;
&lt;br /&gt;
[--&lt;br /&gt;
&lt;br /&gt;
It’s possible that your server closes connections that are idle for too long. You can update either your client (ServerAliveInterval) or your server (ClientAliveInterval).&lt;br /&gt;
&lt;br /&gt;
To update your server (and restart your sshd)&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;ClientAliveInterval 60&amp;quot; | sudo tee -a /etc/ssh/sshd_config &lt;br /&gt;
&lt;br /&gt;
Or client-side:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;ServerAliveInterval 60&amp;quot; &amp;gt;&amp;gt; ~/.ssh/config &lt;br /&gt;
&lt;br /&gt;
I wrote this shell script to automatically restart ssh as soon as it breaks down.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#!/bin/sh&lt;br /&gt;
#This is an SSH-D proxy with auto-reconnect on disconnect&lt;br /&gt;
&lt;br /&gt;
#Created by Liang Sun on 28, Sep, 2011&lt;br /&gt;
#Email: i@liangsun.org&lt;br /&gt;
&lt;br /&gt;
i=0&lt;br /&gt;
while test 1==1&lt;br /&gt;
do&lt;br /&gt;
        exist=`ps aux | grep ENTER.YOUR.IP.HERE | grep 9090`&lt;br /&gt;
        #echo $exist&lt;br /&gt;
        if test -n &amp;quot;$exist&amp;quot;&lt;br /&gt;
        then&lt;br /&gt;
                if test $i -eq 0&lt;br /&gt;
                then&lt;br /&gt;
                        echo &amp;quot;I&amp;#039;m alive since $(date)&amp;quot;&lt;br /&gt;
                fi&lt;br /&gt;
                i=1&lt;br /&gt;
        else&lt;br /&gt;
                i=0&lt;br /&gt;
                echo &amp;quot;I died... God is bringing me back...&amp;quot;&lt;br /&gt;
                ssh p@ENTER.YOUR.IP.HERE -f -N -D 9090&lt;br /&gt;
        fi&lt;br /&gt;
        sleep 1&lt;br /&gt;
done&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--]&lt;br /&gt;
&lt;br /&gt;
Source: How to Solve Broken Pipe Message in SSH Session | Next Spaceship - http://nextspaceship.com/2011/09/how-to-solve-broken-pipe-message-in-ssh-session/&lt;br /&gt;
&lt;br /&gt;
== IPv6 is Default ==&lt;br /&gt;
&lt;br /&gt;
When SSH tries to connect to anything, it will try to resolve the IPv6 address first.  This is dumb.  To force IPv4 as the default, add the following to /etc/ssh_config and /etc/sshd_config:&lt;br /&gt;
&lt;br /&gt;
 AddressFamily inet&lt;br /&gt;
&lt;br /&gt;
You can also do this per connection with:&lt;br /&gt;
&lt;br /&gt;
 ssh -4 [HOST]  # use IPv4 address&lt;br /&gt;
 ssh -6 [HOST]  # use IPv6 address&lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* SSH and IPV6 - Keith&amp;#039;s Personal Blog - http://keith.chaos-realm.net/archives/173-SSH-and-IPV6.html&lt;br /&gt;
* IPv6-ready client programs (selection) - http://tldp.org/HOWTO/Linux+IPv6-HOWTO/x885.html&lt;br /&gt;
* Disabling SSH Connections over ipv6 | Ubuntu Tutorials - http://ubuntu-tutorials.com/2008/01/12/disabling-ssh-connections-on-ipv6/&lt;br /&gt;
&lt;br /&gt;
== Issues ==&lt;br /&gt;
&lt;br /&gt;
=== reverse mapping checking getaddrinfo for SERVER_NAME failed - POSSIBLE BREAK-IN ATTEMPT! ===&lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
* Just add the SERVER_NAME and ip address to /etc/hosts&lt;br /&gt;
* OR add host to DNS&lt;br /&gt;
* OR add &amp;#039;GSSAPIAuthentication no&amp;#039; to each server - painful&lt;br /&gt;
&lt;br /&gt;
See http://www.electrictoolbox.com/reverse-mapping-possible-break-in-ssh/&lt;br /&gt;
&lt;br /&gt;
=== Pseudo-terminal will not be allocated because stdin is not a terminal ===&lt;br /&gt;
&lt;br /&gt;
Error:&lt;br /&gt;
&lt;br /&gt;
 Pseudo-terminal will not be allocated because stdin is not a terminal. &lt;br /&gt;
&lt;br /&gt;
Solution:&lt;br /&gt;
&lt;br /&gt;
The solution to use ssh command without using the console(tty) is to add -t -t option.&lt;br /&gt;
&lt;br /&gt;
example:&lt;br /&gt;
 ssh -t -t -R 8080:127.0.0.1:80 root@192.168.1.1&lt;br /&gt;
&lt;br /&gt;
The -t -t option is useful to execute ssh script in a crontab without error:&lt;br /&gt;
&lt;br /&gt;
 Pseudo-terminal will not be allocated because stdin is not a terminal. &lt;br /&gt;
&lt;br /&gt;
References:&lt;br /&gt;
* Pseudo-terminal will not be allocated because stdin is not a terminal. - The UNIX and Linux Forums - http://www.unix.com/unix-advanced-expert-users/26124-pseudo-terminal-will-not-allocated-because-stdin-not-terminal.html&lt;br /&gt;
&lt;br /&gt;
=== Public keys not accepted on a Secure Linux server ===&lt;br /&gt;
&lt;br /&gt;
If you have copied keys using ssh-copy-id, you may need to fix the Secure Linux permissions:&lt;br /&gt;
 restorecon -r -v ~/.ssh&lt;br /&gt;
&lt;br /&gt;
== keywords ==&lt;br /&gt;
&lt;br /&gt;
ssh sshd secure shell&lt;br /&gt;
&lt;br /&gt;
[[Category:Linux]]&lt;/div&gt;</summary>
		<author><name>Kenneth</name></author>
	</entry>
</feed>