Document SSH key setup

This commit is contained in:
Govindas 2022-08-30 17:55:10 +00:00
parent 1de122e659
commit a7af039799

View File

@ -7,11 +7,15 @@ And also this was made for shared hosting only, not meant on dedicated as you co
# How to setup on |*ssh server in linux*| # How to setup on |*ssh server in linux*|
* create user in your system using the command provided below * create user in your system using the command provided below
``useradd xrambad --shell=/bin/true`` ``useradd appletunnel --shell=/bin/true``
this will make the user have no shell + sftp and scp access. this will make the user have no shell + sftp and scp access.
* create ssh key for the user. * Create SSH key for the user:
- Login into the created user
- Execute `ssh-keygen`
- Leave the passphrase empty during ssh key creation
- Append ~/.ssh/id_rsa.pub contents to ~/.ssh/authorized_keys file, if authorized_keys file does not exist, create it
* there will be issue that user can't login to fix this * there will be issue that user can't login to fix this
add ``/bin/true`` to ``/etc/shells`` add ``/bin/true`` to ``/etc/shells``
@ -22,7 +26,7 @@ add ``/bin/true`` to ``/etc/shells``
[09:16:17 WARN]: [AppleTunneler] no Identities files found, please put them in plugins/AppleTunneler/Identities [09:16:17 WARN]: [AppleTunneler] no Identities files found, please put them in plugins/AppleTunneler/Identities
[09:16:17 ERROR]: Error occurred while enabling AppleTunneler v1.0-SNAPSHOT (Is it up to date?) [09:16:17 ERROR]: Error occurred while enabling AppleTunneler v1.0-SNAPSHOT (Is it up to date?)
``` ```
* place your user that you created private key into ``plugins/AppleTunneler/Identities`` folder * put your created user's private key in ``plugins/AppleTunneler/Identities`` folder
* start server again, but you will be met with another error as shown below * start server again, but you will be met with another error as shown below
``` ```
@ -34,7 +38,6 @@ add ``/bin/true`` to ``/etc/shells``
* run this command to create the host file * run this command to create the host file
``ssh-keyscan limework.net >> /home/test/Desktop/test-server/plugins/AppleTunneler/.known_hosts`` ``ssh-keyscan limework.net >> /home/test/Desktop/test-server/plugins/AppleTunneler/.known_hosts``
* now modify the config of the plugins for your needs by setting host, port, username of ssh server and setting tunneling needed. * now modify the config of the plugins for your needs by setting host, port, username of ssh server and setting tunneling needed.
and done. and done.