<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Trouble connecting with SSH]]></title><description><![CDATA[<p dir="auto">Hi! I've just flashed my <a href="https://devices.ubuntu-touch.io/device/kirin/" target="_blank" rel="noopener noreferrer nofollow ugc">Xperia 10</a>, and it's the first time I'm using Ubuntu Touch. I've tried to set up SSH using <a href="https://docs.ubports.com/en/latest/userguide/advanceduse/ssh.html" target="_blank" rel="noopener noreferrer nofollow ugc">this instruction</a>. However, it immediately refuses my connection with the following message:<br />
<code>ssh: connect to host 192.168.1.204 port 22: Connection refused</code><br />
I've then tried to verify sshd's configuration by running <code>sudo sshd -t</code> and got the following error messages (reconstruction):</p>
<pre><code class="language-shell">could not load host key /etc/ssh/ssh_host_rsa_key
could not load host key /etc/ssh/ssh_host_dsa_key
could not load host key /etc/ssh/ssh_host_ecdsa_key
could not load host key /etc/ssh/ssh_host_ed25519_key
Missing privilege separation directory: /var/run/sshd
</code></pre>
<p dir="auto">I've checked for these keys, and they weren't existing. So, I've generated them myself using <code>ssh-keygen</code>. As for the folder — it's generated by the service script, so it isn't a problem.</p>
<p dir="auto">But still, after rebooting the phone, I can't connect to it, with the same immediate <code>ssh: connect to host 192.168.1.204 port 22: Connection refused</code> error message.</p>
<p dir="auto">What can I do or where should I look? Thanks in advance.</p>
]]></description><link>https://forums.ubports.com/topic/7448/trouble-connecting-with-ssh</link><generator>RSS for Node</generator><lastBuildDate>Thu, 21 May 2026 10:54:47 GMT</lastBuildDate><atom:link href="https://forums.ubports.com/topic/7448.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 14 Feb 2022 18:21:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Trouble connecting with SSH on Mon, 14 Feb 2022 22:48:34 GMT]]></title><description><![CDATA[<p dir="auto">Well, sshd just wasn't running. For some reason, <code>android-gadget-service</code> didn't actually do anything. I've started sshd manually by running <code>sudo /etc/init.d/ssh start</code> and it works.</p>
<p dir="auto">Info I've gathered when trying to determine if it's running:</p>
<p dir="auto">I've run <code>sudo lsof -i -n -P | grep LISTEN</code> on the phone to know if port 22 is open, but it wasn't in the output, which means nothing is listening on it.</p>
<p dir="auto">Then I've run <code>sudo ps aux | grep ssh</code> and no matter if ssh is enabled or not it reports process from <code>/usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session ubuntu-touch-session</code> command to be in the interruptible sleep (<code>Ss</code> in the <code>STAT</code> column). It doesn't report anything else, except <code>grep --color=auto ssh</code> due to results being filtered by grep.</p>
<p dir="auto">Now, as I started it, the output also contains  <code>/usr/sbin/sshd -D -o PasswordAuthentication=no</code>.</p>
]]></description><link>https://forums.ubports.com/post/61841</link><guid isPermaLink="true">https://forums.ubports.com/post/61841</guid><dc:creator><![CDATA[delight_aug]]></dc:creator><pubDate>Mon, 14 Feb 2022 22:48:34 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble connecting with SSH on Mon, 14 Feb 2022 20:57:56 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/farkasdvd" aria-label="Profile: farkasdvd">@<bdi>farkasdvd</bdi></a> thanks for the reply! It's helpful to know.</p>
]]></description><link>https://forums.ubports.com/post/61833</link><guid isPermaLink="true">https://forums.ubports.com/post/61833</guid><dc:creator><![CDATA[delight_aug]]></dc:creator><pubDate>Mon, 14 Feb 2022 20:57:56 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble connecting with SSH on Mon, 14 Feb 2022 20:48:29 GMT]]></title><description><![CDATA[<p dir="auto">It turns out the connection is refused before it reaches sshd. Disabled ssh, rebooted, and checked <code>android-gadget-service status ssh</code> to ensure it's disabled, tried to connect but got the same message. Also, logs in <code>/var/log/auth.log</code> don't contain any ssh logs (apart from running <code>sudo sshd -t</code>).</p>
]]></description><link>https://forums.ubports.com/post/61832</link><guid isPermaLink="true">https://forums.ubports.com/post/61832</guid><dc:creator><![CDATA[delight_aug]]></dc:creator><pubDate>Mon, 14 Feb 2022 20:48:29 GMT</pubDate></item><item><title><![CDATA[Reply to Trouble connecting with SSH on Mon, 14 Feb 2022 20:21:37 GMT]]></title><description><![CDATA[<p dir="auto">On my bq e5 it took only 2 steps to enable ssh:</p>
<ol>
<li>copy my public key to the phone: <code>~/.ssh/authorized_keys</code></li>
<li>enable ssh access using <a href="https://open-store.io/app/ut-tweak-tool.sverzegnassi" target="_blank" rel="noopener noreferrer nofollow ugc">UT Tweak Tool</a>: System &gt; SSH settings &gt; Enable SSH access</li>
</ol>
]]></description><link>https://forums.ubports.com/post/61830</link><guid isPermaLink="true">https://forums.ubports.com/post/61830</guid><dc:creator><![CDATA[farkasdvd]]></dc:creator><pubDate>Mon, 14 Feb 2022 20:21:37 GMT</pubDate></item></channel></rss>