1
0
mirror of http://galexander.org/git/simplesshd.git synced 2024-11-16 03:59:03 +00:00
simplesshd/doc/index.html

94 lines
3.7 KiB
HTML
Raw Normal View History

2014-12-22 14:06:47 +00:00
<html><head><title>SimpleSSHD</title></head>
<body>
<p style="float:right;"><img src="icon.png"></p>
<h1>SimpleSSHD</h1>
<p>SimpleSSHD is an SSH2 server based on dropbear that supports scp,
sftp, and rsync. It only supports public-key based authentication (no
password/interactive auth). It does not use root, which means it must
listen on a port over 1024 (defaults to port 2222).</p>
<h2>Quick start</h2>
<ul>
<li> Install SimpleSSHD.
<li> Make a directory <tt>/sdcard/ssh</tt>, and put an
<tt>authorized_keys</tt> file in that directory.
<li> On any computer which will connect to your Android device, set the
port to 2222. With OpenSSH, this can be done by putting these lines in
<tt>~/.ssh/config</tt>:
<pre>
Host myphone
Port 2222
</pre>
<li> Launch SimpleSSHD, and in Settings enable "Start on Boot", and
manually start it for the first time.
<li> You might want to put a <tt>.profile</tt> in <tt>/sdcard/ssh</tt>,
too.
</ul>
<p>Voila! You can use ssh/scp/sftp/rsync to talk to your Android device!</p>
<h2>Configuration</h2>
2014-12-22 14:06:47 +00:00
<p>There are three directory settings that are important for SimpleSSHD.</p>
<p>The first is the path for general dropbear files, which defaults to
<tt>/sdcard/ssh</tt>. Most importantly, this is where
<tt>authorized_keys</tt> is found. It is also where host keys wind up
(they are created on demand), and where temporary files go.</p>
<p>Next is the path to the login shell. The default Android shell is
2014-12-22 18:35:20 +00:00
<tt>/system/bin/sh</tt>, but you may prefer to use the one that comes with
2015-06-21 13:09:42 +00:00
busybox or whatever. If you set it to the su binary (i.e.,
<tt>/system/xbin/su</tt>), then scp, sftp, and
rsync will run as root and should be able to access files
outside of the sdcard.</p>
<p>A bug in SuperSU interacts with an infelicity in rsync to cause an
occasional deadlock. This is a real pain because I use SuperSU+rsync
for system-wide backups, which will always eventually trigger the
deadlock. To work around this, there is a "Buffer hack" option that
should be enabled if you use rsync with SuperSU. It adds a miniscule
overhead to rsync, but isn't harmful even if you aren't using
SuperSU.</p>
<p>Finally, there is the path for the home directory, which also defaults
to <tt>/sdcard/ssh</tt>. This is where your ssh session starts out, and is
2014-12-22 14:06:47 +00:00
where <tt>.profile</tt> will be found if it is present.</p>
<p>There is also a place where you can put commandline options for
dropbear server. The options which are hardcoded are: <tt>-R -F -p
:portno</tt>. You can use <tt>\</tt> or <tt>"</tt> to escape characters
in this commandline.</p>
<h2>Change Log</h2>
2014-12-22 14:06:47 +00:00
<ul>
<li> <b>2014/12/22 Version 1.0:</b> Initial public release.
<li> <b>2014/12/29 Version 1.1:</b> Works with Lollipop now.
2015-01-18 21:45:47 +00:00
<li> <b>2015/01/18 Version 1.2:</b> Displays the IP address it's listening on.
2015-06-21 13:10:56 +00:00
<li> <b>2015/06/21 Version 1.3:</b> Hack to make rsync work with SuperSU.
2015-11-23 14:08:52 +00:00
<li> <b>2015/11/23 Version 1.4:</b> Don't abort if IP address lookup fails, and make proper "About" menu.
2016-06-11 18:24:45 +00:00
<li> <b>2016/06/11 Version 1.5:</b> SuperSU+rsync hack now limits the buffer size to 1MB.
<li> <b>2016/06/12 Version 1.6:</b> Fix typo that broke scp/sftp/rsync in version 1.5.
2014-12-22 14:06:47 +00:00
</ul>
<h2>About</h2>
2014-12-22 14:06:47 +00:00
<p>SimpleSSHD is built using parts from open source projects:
<a href="https://matt.ucc.asn.au/dropbear/dropbear.html">Dropbear SSH</a>,
<a href="http://www.openssh.com/">openssh</a> (for scp and sftp-server),
and <a href="http://rsync.samba.org/">rsync</a>. Those projects in turn
are built on other projects. A lot of people's work is represented here,
and very little of my own.</p>
2014-12-22 14:06:47 +00:00
<p>But if you find bugs/infelicities, it's probably my fault, so email
me:<br>
<img src="/email.png"></p>
<p>To get the source:<br>
<blockquote><pre>git clone http://galexander.org/git/simplesshd.git</pre></blockquote></p>
2014-12-22 14:06:47 +00:00
</body></html>