Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update netservices.md and installation-guide #542

Merged
merged 9 commits into from
Aug 1, 2021
39 changes: 20 additions & 19 deletions content/guides/daily-tasks/netservices.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ date = "2010-05-11T15:29:32.000Z"
tags = []
+++

The basic installation of Haiku contains several standard system network utilities including SSH and Telnet
The basic installation of Haiku contains several standard system network services including a FTP, Telnet, and SSH Server.

<h3>Setting your user password</h3>
<p>A good first step is to set the password for your user account, in order to secure your system before opening it to the world.
<p>A good first step is to set the password for your user account (default name is 'user'), in order to secure your system before opening it to the world.

<pre class="terminal">~> passwd
new password:
Expand All @@ -18,29 +18,34 @@ repeat new password:</pre></p>
Haiku's default hostname is shredder. If shredder doesn't resolve, you can simply launch the
<span class='app'>Network</span> preference applet to find your system's network address.
You can change the hostname by editing /system/settings/network/hostname.</div>
<br>

<h3>ftpd - an FTP server daemon</h3>
<h3>ftpd - FTP server daemon</h3>
Haiku can easily be made to listen for incoming FTP connections to serve its files.

<h4>Start ftpd at boot</h4>
<p>Haiku will automatically start its FTP server daemon at boot if you remove the comment hashes (#) from the service ftp section of /boot/system/settings/network/services.
DISCLAIMER: ftpd does not support SFTP or FTPS so network traffic is unencrypted.

<h4>Start ftpd manually</h4>
<p>To start the FTP server daemon manually, simply execute ftpd.</p>
<p>To start the FTP server open the Network preferences, select **`FTP server`** from its list of services and click **`Enable`**.</p>
<br>
<h3>telnetd - Telnet server daemon</h3>
Haiku can easily be made to listen for incoming telnet connections.

<h3>sshd - the secure shell daemon</h3>
DISCLAIMER: telnet traffic is unencrypted.

<p>To start the Telnet server open the Network preferences, select **`Telnet server`** from its list of services and click **`Enable`**.</p>
<br>
<h3>sshd - Secure shell daemon</h3>
SSH is a network protocol that allows for data to be exchanged using a secure channel between two networked devices. The most common use is shell access.

Starting the SSH server daemon in Haiku is easy:
The SSH server daemon in Haiku is already started on a deafult install, but it does not allow connections until configured.
<ol>
<li>Add the SSH server user: <pre class="terminal">useradd sshd</pre></li>
<li>Edit /system/settings/ssh/sshd_config and add the following option: <pre class="terminal">PermitRootLogin yes</pre></li>
<li>Start the SSH server daemon: <pre class="terminal">/boot/system/bin/sshd</pre></li>
<li>Edit /system/settings/ssh/sshd_config, uncomment the following option, and set the value to yes: <pre class="terminal">PermitRootLogin yes</pre></li>
<li>Restart Haiku or kill the existing sshd process.</li>
</ol>

After starting sshd, we should now be able to verify that the daemon is indeed running:
We should now be able to verify that the daemon is indeed running:
<pre class="terminal">ps | grep sshd | grep -v grep
/boot/system/bin/sshd 237 1 0 0</pre>
/bin/sshd 237 1 0 0</pre>

In the example above, sshd has the process id of 237 and is running. We can now connect to Haiku with the username of 'user' and the password which you set at the beginning of this article:
<pre class="terminal">alex@leenux-desktop:~$ ssh [email protected]
Expand All @@ -49,9 +54,5 @@ [email protected]'s password:
Welcome to the Haiku shell.

~> uname -a
Haiku shredder 1 r36769 May 8 2010 20:58:31 BePC Haiku
~> gcc -v
using priority 5
Reading specs from /packages/gcc-2.95.3_2013_08_15-2/.self/develop/tools/lib/gcc-lib/i586-pc-haiku/2.95.3-haiku-2013_08_15/specs
gcc version 2.95.3-haiku-2013_08_15
Haiku shredder 1 hrev55181+52 Jul 27 2021 08:11: x86_64 x86_64 Haiku
~> </pre>