<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Openssh on Terminal</title><link>https://muisti.atk-neuvos.fi/tags/openssh/</link><description>Recent content in Openssh on Terminal</description><generator>Hugo</generator><language>en</language><lastBuildDate>Wed, 30 Apr 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://muisti.atk-neuvos.fi/tags/openssh/index.xml" rel="self" type="application/rss+xml"/><item><title>Android &lt;-&amp;gt; PC notepad style file editor/sync</title><link>https://muisti.atk-neuvos.fi/posts/filesync/</link><pubDate>Wed, 30 Apr 2025 00:00:00 +0000</pubDate><guid>https://muisti.atk-neuvos.fi/posts/filesync/</guid><description>&lt;h1 id="general-info"&gt;General info&lt;/h1&gt;
&lt;p&gt;Mobile and PC can be in any different networks, ssh is used for comms.
OpenVPN is used for handy and secure access bridging any networks.&lt;/p&gt;
&lt;h1 id="android-setup"&gt;Android setup&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;install “Simple SSHD” from play market, it is dropbear sshd daemon
&lt;ul&gt;
&lt;li&gt;inject your public key into phone sshd&lt;/li&gt;
&lt;li&gt;configure port etc&lt;/li&gt;
&lt;li&gt;create sshd shortcut on home screen&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;install fossify notepad from play market
&lt;ul&gt;
&lt;li&gt;configure new txt file with export to sd option&lt;/li&gt;
&lt;li&gt;make the file /sdcard/000notepad.txt&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="linux-setup"&gt;Linux setup&lt;/h1&gt;
&lt;ul&gt;
&lt;li&gt;working ssh client and some network required&lt;/li&gt;
&lt;li&gt;openvpn client is required&lt;/li&gt;
&lt;/ul&gt;
&lt;h1 id="place-editor-script-into-pc-binmemo"&gt;Place editor script into PC ~/bin/memo&lt;/h1&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;#!/bin/bash
MNT=$(mktemp -d); sshfs phone:/sdcard/ $MNT &amp;amp;&amp;amp; vi $MNT/000notepad.txt &amp;amp;&amp;amp; umount $MNT &amp;amp;&amp;amp; rmdir $MNT
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id="ssh-client-config-setup-with-lanvpn-aliasing"&gt;SSH client config setup with LAN/VPN aliasing&lt;/h1&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;# phone in VPN network
Match originalhost op10 localnetwork 172.16.10.0/24
Hostname 172.16.10.2

# phone in home LAN
Host op10
HostName 192.168.1.44
Port 2222
&lt;/code&gt;&lt;/pre&gt;&lt;h1 id="usage"&gt;Usage&lt;/h1&gt;
&lt;p&gt;Run memo command in any network while phone sshd is running and you can view/edit the file from anywhere&lt;/p&gt;</description></item></channel></rss>