<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wikibase.ronzz.org/index.php?action=history&amp;feed=atom&amp;title=Cheatsheets%3ALinuxCLI%2Fssh</id>
	<title>Cheatsheets:LinuxCLI/ssh - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wikibase.ronzz.org/index.php?action=history&amp;feed=atom&amp;title=Cheatsheets%3ALinuxCLI%2Fssh"/>
	<link rel="alternate" type="text/html" href="https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;action=history"/>
	<updated>2026-10-16T14:36:23Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0</generator>
	<entry>
		<id>https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8421&amp;oldid=prev</id>
		<title>Rongzhou at 08:02, 30 September 2026</title>
		<link rel="alternate" type="text/html" href="https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8421&amp;oldid=prev"/>
		<updated>2026-09-30T08:02:31Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;a href=&quot;https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;amp;diff=8421&amp;amp;oldid=8415&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Rongzhou</name></author>
	</entry>
	<entry>
		<id>https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8415&amp;oldid=prev</id>
		<title>SeedBot: Remove stray MCP-footer line (Wiki: wikibase.ronzz.org)</title>
		<link rel="alternate" type="text/html" href="https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8415&amp;oldid=prev"/>
		<updated>2026-09-29T20:42:36Z</updated>

		<summary type="html">&lt;p&gt;Remove stray MCP-footer line (Wiki: wikibase.ronzz.org)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 20:42, 29 September 2026&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-l234&quot;&gt;Line 234:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 234:&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;* [https://tldr.sh tldr] — community-maintained short examples&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;* [https://tldr.sh tldr] — community-maintained short examples&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;* [https://explainshell.com explainshell.com] — annotate any command line&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;* [https://explainshell.com explainshell.com] — annotate any command line&lt;/div&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Wiki: wikibase.ronzz.org&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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;[[Category:LinuxCLI]]&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;[[Category:LinuxCLI]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikibase:diff:1.41:old-8414:rev-8415:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>SeedBot</name></author>
	</entry>
	<entry>
		<id>https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8414&amp;oldid=prev</id>
		<title>SeedBot: Add Category:LinuxCLI (LinuxCLI backfill) (via update-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8414&amp;oldid=prev"/>
		<updated>2026-09-29T20:40:14Z</updated>

		<summary type="html">&lt;p&gt;Add Category:LinuxCLI (LinuxCLI backfill) (via update-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 20:40, 29 September 2026&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-l236&quot;&gt;Line 236:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 236:&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;Wiki: wikibase.ronzz.org&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;Wiki: wikibase.ronzz.org&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;[[Category:LinuxCLI]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikibase:diff:1.41:old-8399:rev-8414:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>SeedBot</name></author>
	</entry>
	<entry>
		<id>https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8399&amp;oldid=prev</id>
		<title>RonzzWikiCowriterAI: Remove stray placeholder line in the Agent section. AI-assisted (RonzzWikiCowriter) (via update-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8399&amp;oldid=prev"/>
		<updated>2026-09-29T15:10:38Z</updated>

		<summary type="html">&lt;p&gt;Remove stray placeholder line in the Agent section. AI-assisted (RonzzWikiCowriter) (via update-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&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 15:10, 29 September 2026&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-l197&quot;&gt;Line 197:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 197:&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;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;gt;&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;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;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 -A user@host                  # forward the agent to the server&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 -A user@host                  # forward the agent to the server&lt;/div&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;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;ssh -c user@host                  # hmm&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&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-add -c ~/.ssh/id_ed25519      # ...or make every use of a key prompt for confirmation&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-add -c ~/.ssh/id_ed25519      # ...or make every use of a key prompt for confirmation&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;&amp;lt;/syntaxhighlight&amp;gt;&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;&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wikibase:diff:1.41:old-8398:rev-8399:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>RonzzWikiCowriterAI</name></author>
	</entry>
	<entry>
		<id>https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8398&amp;oldid=prev</id>
		<title>RonzzWikiCowriterAI: Create ssh cheatsheet: connecting, keys, ~/.ssh/config, file copying, port forwarding, agent, troubleshooting. AI-assisted (RonzzWikiCowriter) (via create-page on MediaWiki MCP Server)</title>
		<link rel="alternate" type="text/html" href="https://wikibase.ronzz.org/index.php?title=Cheatsheets:LinuxCLI/ssh&amp;diff=8398&amp;oldid=prev"/>
		<updated>2026-09-29T15:09:50Z</updated>

		<summary type="html">&lt;p&gt;Create ssh cheatsheet: connecting, keys, ~/.ssh/config, file copying, port forwarding, agent, troubleshooting. AI-assisted (RonzzWikiCowriter) (via create-page on MediaWiki MCP Server)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{DesktopLinux}}&lt;br /&gt;
&lt;br /&gt;
The everyday OpenSSH client: log into a remote machine, run one-off commands, copy files, and tunnel ports over an encrypted channel. Everything here is typed on your local Linux machine; the remote side only needs a running &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;sshd&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
New to SSH? Every command has a built-in manual — try &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;man ssh&amp;lt;/syntaxhighlight&amp;gt;, &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;man ssh_config&amp;lt;/syntaxhighlight&amp;gt; or [https://tldr.sh tldr ssh] for short examples.&lt;br /&gt;
&lt;br /&gt;
== Basic example: set up key login ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;gt;&lt;br /&gt;
ssh user@host                            # first connection: type the password&lt;br /&gt;
ssh-keygen -t ed25519 -C &amp;quot;user@laptop&amp;quot;   # create ~/.ssh/id_ed25519 and its .pub&lt;br /&gt;
ssh-copy-id user@host                    # install the public half on the server&lt;br /&gt;
ssh user@host                            # no password from now on&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The private key never leaves your machine; the server only stores the public half, one key per line, in &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;~/.ssh/authorized_keys&amp;lt;/syntaxhighlight&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
== Connecting ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;gt;&lt;br /&gt;
ssh host                              # same username as your local one&lt;br /&gt;
ssh user@host                         # log in as another user&lt;br /&gt;
ssh -p 2222 user@host                 # non-standard port&lt;br /&gt;
ssh user@host uptime                  # run one command instead of a shell&lt;br /&gt;
ssh user@host &amp;#039;df -h; free -h&amp;#039;        # several commands: quote them for the remote shell&lt;br /&gt;
ssh -t user@host tmux attach          # -t: force a TTY, for interactive programs&lt;br /&gt;
ssh -J bastion user@host              # jump through bastion (ProxyJump)&lt;br /&gt;
ssh -J user@bastion:2222 user@host    # jump host with its own user and port&lt;br /&gt;
ssh -o ProxyCommand=&amp;quot;ssh -W %h:%p bastion&amp;quot; user@host   # same, on OpenSSH &amp;lt; 7.3&lt;br /&gt;
ssh -v user@host                      # debug the connection; -vv and -vvv go further&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Flag !! Effect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-p port&amp;lt;/syntaxhighlight&amp;gt; || connect to a port other than 22&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-i key&amp;lt;/syntaxhighlight&amp;gt; || authenticate with a specific private key&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-t&amp;lt;/syntaxhighlight&amp;gt; / &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-T&amp;lt;/syntaxhighlight&amp;gt; || force / disable pseudo-terminal allocation&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-N&amp;lt;/syntaxhighlight&amp;gt; || no remote command: forward ports only&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-f&amp;lt;/syntaxhighlight&amp;gt; || go to the background just before running the command&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-J host&amp;lt;/syntaxhighlight&amp;gt; || connect via a jump host; comma-separated for several&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-L&amp;lt;/syntaxhighlight&amp;gt; / &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-R&amp;lt;/syntaxhighlight&amp;gt; / &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-D&amp;lt;/syntaxhighlight&amp;gt; || port forwarding (see below)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-A&amp;lt;/syntaxhighlight&amp;gt; || forward your local ssh-agent to the server (see the caution below)&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-o OPT=value&amp;lt;/syntaxhighlight&amp;gt; || set any ssh_config option on the command line&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Escape sequences are recognised only at the start of a line, inside an interactive session:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Escape !! Action&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;~.&amp;lt;/syntaxhighlight&amp;gt; || disconnect&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;~^Z&amp;lt;/syntaxhighlight&amp;gt; || suspend ssh, back to the local shell&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;~#&amp;lt;/syntaxhighlight&amp;gt; || list the forwarded connections&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;~C&amp;lt;/syntaxhighlight&amp;gt; || command line: add &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-L&amp;lt;/syntaxhighlight&amp;gt;, &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-R&amp;lt;/syntaxhighlight&amp;gt; or &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-D&amp;lt;/syntaxhighlight&amp;gt; to the live session&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;~?&amp;lt;/syntaxhighlight&amp;gt; || list all escapes&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Keys ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;gt;&lt;br /&gt;
ssh-keygen -t ed25519                        # new key in ~/.ssh/id_ed25519 (+ .pub)&lt;br /&gt;
ssh-keygen -t ed25519 -f ~/.ssh/id_work -C &amp;quot;deploy@laptop&amp;quot;   # a named key, with a comment&lt;br /&gt;
ssh-keygen -t rsa -b 4096                    # RSA, when a server is too old for ed25519&lt;br /&gt;
ssh-keygen -p -f ~/.ssh/id_ed25519           # change the passphrase&lt;br /&gt;
ssh-keygen -y -f ~/.ssh/id_ed25519           # print the public half of a private key&lt;br /&gt;
ssh-keygen -l -f ~/.ssh/id_ed25519.pub       # fingerprint of a key&lt;br /&gt;
ssh-keygen -R host                           # forget a host&amp;#039;s key in known_hosts&lt;br /&gt;
ssh-copy-id user@host                        # install the default key on a server&lt;br /&gt;
ssh-copy-id -i ~/.ssh/id_work.pub user@host  # install one specific key&lt;br /&gt;
ssh -i ~/.ssh/id_work user@host              # use a key without touching any config&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Permissions are enforced:&amp;#039;&amp;#039;&amp;#039; &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;ssh&amp;lt;/syntaxhighlight&amp;gt; silently ignores a private key that anyone else can read. Keep &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;~/.ssh&amp;lt;/syntaxhighlight&amp;gt; at &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;700&amp;lt;/syntaxhighlight&amp;gt; and private keys at &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;600&amp;lt;/syntaxhighlight&amp;gt; (&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;chmod 600 ~/.ssh/id_ed25519&amp;lt;/syntaxhighlight&amp;gt;). Protect the key with a passphrase and load it into an [[#Agent|agent]] rather than leaving it unencrypted.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== ~/.ssh/config ==&lt;br /&gt;
&lt;br /&gt;
The place to turn a long command line into a name you can type.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; copy&amp;gt;&lt;br /&gt;
Host web                       # `ssh web` connects as deploy@203.0.113.10 on port 2222&lt;br /&gt;
    HostName 203.0.113.10&lt;br /&gt;
    User deploy&lt;br /&gt;
    Port 2222&lt;br /&gt;
    IdentityFile ~/.ssh/id_work&lt;br /&gt;
&lt;br /&gt;
Host *.internal.example.com&lt;br /&gt;
    ProxyJump bastion&lt;br /&gt;
&lt;br /&gt;
Host legacy&lt;br /&gt;
    HostKeyAlgorithms +ssh-rsa          # for old servers only&lt;br /&gt;
    PubkeyAcceptedAlgorithms +ssh-rsa&lt;br /&gt;
&lt;br /&gt;
Host *                         # global defaults: keep this block LAST&lt;br /&gt;
    ServerAliveInterval 30     # ping every 30 s, so idle NAT and firewall sessions survive&lt;br /&gt;
    ServerAliveCountMax 3&lt;br /&gt;
    AddKeysToAgent yes         # load a key into the agent on first use&lt;br /&gt;
    ControlMaster auto         # reuse one TCP connection for every later session&lt;br /&gt;
    ControlPath ~/.ssh/cm/%C&lt;br /&gt;
    ControlPersist 10m&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;gt;&lt;br /&gt;
mkdir -p ~/.ssh/cm              # ControlPath does not create the directory&lt;br /&gt;
ssh -G web                      # print the configuration and options actually used&lt;br /&gt;
ssh -F ~/.ssh/otherconf host    # use an alternative config file&lt;br /&gt;
ssh -o StrictHostKeyChecking=accept-new host   # accept an unknown host key once&lt;br /&gt;
ssh -O check host               # is a shared connection open?&lt;br /&gt;
ssh -O exit host                # close it, and every session using it&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;For each option, the first value found wins.&amp;#039;&amp;#039;&amp;#039; Put the specific &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;Host&amp;lt;/syntaxhighlight&amp;gt; blocks at the top of the file and the catch-all &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;Host *&amp;lt;/syntaxhighlight&amp;gt; at the bottom, or the defaults will shadow the specifics. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;IdentityFile&amp;lt;/syntaxhighlight&amp;gt; is the exception: every entry is tried in order.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Connection sharing&amp;#039;&amp;#039;&amp;#039; (the &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;ControlMaster&amp;lt;/syntaxhighlight&amp;gt; block) makes the second and later connections to a host start instantly, because they reuse the first, already-authenticated one; later &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;scp&amp;lt;/syntaxhighlight&amp;gt;, &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;rsync&amp;lt;/syntaxhighlight&amp;gt; and &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;git&amp;lt;/syntaxhighlight&amp;gt; calls to that host skip the handshake too.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Copying files ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;gt;&lt;br /&gt;
scp file1.txt user@host:/tmp/          # upload&lt;br /&gt;
scp user@host:/tmp/file1.txt .         # download to the current directory&lt;br /&gt;
scp -r dir/ user@host:/tmp/            # a whole directory&lt;br /&gt;
scp -P 2222 file1.txt user@host:/tmp/  # note: -P (capital) is scp&amp;#039;s port flag&lt;br /&gt;
scp &amp;#039;user@host:/var/log/*.log&amp;#039; .       # quote the remote glob&lt;br /&gt;
rsync -avz --progress dir/ user@host:/tmp/   # only what changed, resumable&lt;br /&gt;
sftp user@host                         # interactive: ls, get, put, bye&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;scp&amp;lt;/syntaxhighlight&amp;gt; has spoken SFTP since OpenSSH 9.0&amp;#039;&amp;#039;&amp;#039;, and it reads the same &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;~/.ssh/config&amp;lt;/syntaxhighlight&amp;gt; blocks: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;scp web:file1.txt .&amp;lt;/syntaxhighlight&amp;gt; works once &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;Host web&amp;lt;/syntaxhighlight&amp;gt; exists. For large or repeated transfers prefer &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;rsync&amp;lt;/syntaxhighlight&amp;gt;, which transfers only the differences and can resume — it must be installed on both machines.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Port forwarding ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;gt;&lt;br /&gt;
ssh -L 8080:localhost:80 user@host        # local 8080 → port 80, as seen from the server&lt;br /&gt;
ssh -L 5432:db.internal:5432 user@host    # reach a host only the server can reach&lt;br /&gt;
ssh -R 9000:localhost:3000 user@host      # the server&amp;#039;s 9000 → your local 3000&lt;br /&gt;
ssh -D 1080 user@host                     # SOCKS5 proxy on localhost:1080&lt;br /&gt;
ssh -N -f -L 8080:localhost:80 user@host  # tunnel only, in the background&lt;br /&gt;
ssh -O exit user@host                     # close the backgrounded tunnel&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Flag !! Listens on !! Traffic goes to&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-L 8080:host:80&amp;lt;/syntaxhighlight&amp;gt; || your machine, port 8080 || &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;host&amp;lt;/syntaxhighlight&amp;gt;, as resolved from the server&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-R 9000:host:3000&amp;lt;/syntaxhighlight&amp;gt; || the server, port 9000 || &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;host&amp;lt;/syntaxhighlight&amp;gt;, as resolved from your machine&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-D 1080&amp;lt;/syntaxhighlight&amp;gt; || your machine, port 1080 || whatever the SOCKS client asks for&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The same forwardings in config, for a tunnel you start by name:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; copy&amp;gt;&lt;br /&gt;
Host dbtunnel&lt;br /&gt;
    HostName db.example.com&lt;br /&gt;
    LocalForward 5432 localhost:5432   # 5432 as seen from the server&lt;br /&gt;
    SessionType none                   # no shell, just the tunnel (OpenSSH 8.4+)&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-L&amp;lt;/syntaxhighlight&amp;gt; listens on your machine, &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-R&amp;lt;/syntaxhighlight&amp;gt; on the server&amp;#039;s.&amp;#039;&amp;#039;&amp;#039; Both bind to loopback by default, so only that machine can reach the port — exposing it to a network needs an explicit bind address (&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-L 0.0.0.0:8080:localhost:80&amp;lt;/syntaxhighlight&amp;gt;), and ports below 1024 require root.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Agent ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;gt;&lt;br /&gt;
eval &amp;quot;$(ssh-agent -s)&amp;quot;            # start an agent in this shell&lt;br /&gt;
ssh-add ~/.ssh/id_ed25519         # load a key; asks for the passphrase once&lt;br /&gt;
ssh-add -t 8h ~/.ssh/id_ed25519   # ... dropping it again after 8 hours&lt;br /&gt;
ssh-add -l                        # fingerprints of the loaded keys&lt;br /&gt;
ssh-add -L                        # full public keys&lt;br /&gt;
ssh-add -d ~/.ssh/id_ed25519      # remove one key&lt;br /&gt;
ssh-add -D                        # remove every key&lt;br /&gt;
ssh-agent -k                      # kill this agent&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; copy&amp;gt;&lt;br /&gt;
ssh -A user@host                  # forward the agent to the server&lt;br /&gt;
ssh -c user@host                  # hmm&lt;br /&gt;
ssh-add -c ~/.ssh/id_ed25519      # ...or make every use of a key prompt for confirmation&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;blockquote&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Avoid &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;ssh -A&amp;lt;/syntaxhighlight&amp;gt; on hosts you do not fully trust:&amp;#039;&amp;#039;&amp;#039; anyone able to read the agent socket there (root, mostly) can authenticate as you for as long as the session lasts, without ever seeing the key. Prefer &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;-J&amp;lt;/syntaxhighlight&amp;gt; (ProxyJump), where authentication stays end-to-end. &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;AddKeysToAgent yes&amp;lt;/syntaxhighlight&amp;gt; in &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;~/.ssh/config&amp;lt;/syntaxhighlight&amp;gt; loads keys into the agent on first use.&lt;br /&gt;
&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Symptom !! Fix&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;Permission denied (publickey)&amp;lt;/syntaxhighlight&amp;gt; || the key is not installed: &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;ssh-copy-id user@host&amp;lt;/syntaxhighlight&amp;gt;; check &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;chmod 600 ~/.ssh/id_ed25519&amp;lt;/syntaxhighlight&amp;gt;; &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;ssh -v&amp;lt;/syntaxhighlight&amp;gt; lists the keys the client offers&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;Too many authentication failures&amp;lt;/syntaxhighlight&amp;gt; || the agent offers more keys than the server allows attempts: add &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;IdentitiesOnly yes&amp;lt;/syntaxhighlight&amp;gt; to that host&amp;#039;s block&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;REMOTE HOST IDENTIFICATION HAS CHANGED!&amp;lt;/syntaxhighlight&amp;gt; || the server&amp;#039;s key really did change — confirm with its admin before running &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;ssh-keygen -R host&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;Connection refused&amp;lt;/syntaxhighlight&amp;gt; || wrong port, &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;sshd&amp;lt;/syntaxhighlight&amp;gt; down, or a firewall: test with &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;nc -vz host 22&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;Connection timed out&amp;lt;/syntaxhighlight&amp;gt; || nothing answers at all: a firewall is dropping the packets, or the host is unreachable&lt;br /&gt;
|-&lt;br /&gt;
| the session freezes after an idle spell || &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;ServerAliveInterval 30&amp;lt;/syntaxhighlight&amp;gt; in the config file&lt;br /&gt;
|-&lt;br /&gt;
| which key, which options, which file? || &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;ssh -G host&amp;lt;/syntaxhighlight&amp;gt; prints the effective configuration, &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;ssh -vvv host&amp;lt;/syntaxhighlight&amp;gt; everything the client tries&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== For more ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;man ssh&amp;lt;/syntaxhighlight&amp;gt;, &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;man ssh_config&amp;lt;/syntaxhighlight&amp;gt;, &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;man ssh-keygen&amp;lt;/syntaxhighlight&amp;gt;, &amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot; inline&amp;gt;man sshd_config&amp;lt;/syntaxhighlight&amp;gt; — the built-in manuals, always installed&lt;br /&gt;
* [https://www.man7.org/linux/man-pages/man1/ssh.1.html ssh(1)] — every client flag, escape sequence and environment variable&lt;br /&gt;
* [https://www.man7.org/linux/man-pages/man5/ssh_config.5.html ssh_config(5)] — every client option, including the forwarding and multiplexing ones&lt;br /&gt;
* [https://www.man7.org/linux/man-pages/man1/ssh-keygen.1.html ssh-keygen(1)] — certificates, FIDO keys, key format conversion&lt;br /&gt;
* [https://www.man7.org/linux/man-pages/man5/sshd_config.5.html sshd_config(5)] — the server side: &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;authorized_keys&amp;lt;/syntaxhighlight&amp;gt;, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;PermitRootLogin&amp;lt;/syntaxhighlight&amp;gt;, &amp;lt;syntaxhighlight lang=&amp;quot;text&amp;quot; inline&amp;gt;PasswordAuthentication&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* [https://www.openssh.com/ OpenSSH] — release notes and security advisories&lt;br /&gt;
* [https://tldr.sh tldr] — community-maintained short examples&lt;br /&gt;
* [https://explainshell.com explainshell.com] — annotate any command line&lt;br /&gt;
&lt;br /&gt;
Wiki: wikibase.ronzz.org&lt;/div&gt;</summary>
		<author><name>RonzzWikiCowriterAI</name></author>
	</entry>
</feed>