Jessie setup ssh: Difference between revisions

From embeddedTS Manuals
(Created page with "To install ssh, install the package as normal with apt-get: <source lang=bash> apt-get install openssh-server </source> Make sure your board is configured properly on the net...")
 
(Root can't login via ssh without an options change.)
 
(4 intermediate revisions by 2 users not shown)
Line 4: Line 4:
</source>
</source>


Make sure your board is configured properly on the network, and set a password for your remote user.  SSH will not allow remote connections without a password or a shared key.
 
Make sure the device is configured on the network and set a password for the remote user.  SSH will not allow remote connections without a password or a valid SSH key pair.


<source lang=bash>
<source lang=bash>
Line 10: Line 11:
</source>
</source>


SSH in Debian Jessie also now either requires a key, or requires editing /etc/ssh/sshd_config.  Comment out the line that says:
{{Note|The default OpenSSH server will not permit root to login via SSH as a security precaution.  To allow root to log in via ssh anyway, edit the /etc/ssh/sshd_config file and add the line <code>PermitRootLogin yes</code> in the authentication section.  This change will take effect after reboot or after sshd service restart.}}
<pre>
PermitRootLogin without-password
</pre>


You should now be able to connect from a remote Linux or OSX system using "ssh" or from Windows using a client such as [http://www.chiark.greenend.org.uk/~sgtatham/putty/ putty].
After this setup it is now possible to connect from a remote PC supporting SSH.  On Linux/OS X this is the "ssh" command, or from Windows using a client such as [http://www.chiark.greenend.org.uk/~sgtatham/putty/ PuTTY].


NoteIf your intended application does not have a DNS source on the target network, it can save login time to add "UseDNS no" in /etc/ssh/sshd_config.
{{Note|If a DNS server is not present on the target network, it is possible to save time at login by adding "UseDNS no" in /etc/ssh/sshd_config.}}

Latest revision as of 15:37, 25 March 2020

To install ssh, install the package as normal with apt-get:

apt-get install openssh-server


Make sure the device is configured on the network and set a password for the remote user. SSH will not allow remote connections without a password or a valid SSH key pair.

passwd root
Note: The default OpenSSH server will not permit root to login via SSH as a security precaution. To allow root to log in via ssh anyway, edit the /etc/ssh/sshd_config file and add the line PermitRootLogin yes in the authentication section. This change will take effect after reboot or after sshd service restart.

After this setup it is now possible to connect from a remote PC supporting SSH. On Linux/OS X this is the "ssh" command, or from Windows using a client such as PuTTY.

Note: If a DNS server is not present on the target network, it is possible to save time at login by adding "UseDNS no" in /etc/ssh/sshd_config.