Jump to content

Connect from remote-server to LAN Turtle using AutoSSH. [SOLUTION]


uk47
 Share

Recommended Posts

For anyone who wants to use AutoSSH to SSH from their remote-server to their LAN Turtle, here are the 2022 instructions as the original Oct 3, 2017 instructions seem to be outdated:

15 Steps:

Instructions From Darren: https://www.youtube.com/watch?v=uIdvvrDrRj0 (LAN Turtle 104 - Persistent Shell Access with AutoSSH)

1.) SSH into your remote-server and then nano/vim into the "/etc/ssh/sshd_config" file.

2.) Make sure "PubkeyAuthentication" and "PasswordAuthentication" are both set to "yes". (We will change this later). Save and exit the file.

3.) From the remote-server run the command "sudo service ssh restart".

4.) Open a new tab and SSH into your LAN Turtle. Follow the instructions from Darren to download the "autossh" and "keymanager" modules.

5.) Follow Darren's instructions for the "keymanager" module. (I used my "root" account instead of creating an account named "turtle").

6.) Follow Darren's instructions for the "autossh" module.

7.) Exit the LAN Turtle GUI and enter into the LAN Turtle command-line (Main Menu click "Exit").

8.) From the Turtle's command-line enter the following: "ssh-copy-id <host>@<server-ip>". Enter your password for the remote-server ip. EXAMPLE: ssh-copy-id root@161.14.0.101

9.) From the Turtle command-line, nano/vim into the "/etc/config/autossh" file.

10.) Once within the "autossh" file, go to the line that executes the actual SSH command. Erase what is in between the single quotes ' ' and replace it with: '-Nf -R 2222:localhost:22 <host>@<server-ip>'. Enter the password for the server-ip when prompted.

11.) Now go back into your remote-server command-line and nano/vim into the "/etc/ssh/sshd_config" file. Change "PasswordAuthentication" to "no". Save and exit the file.

12.) Still within your remote-server, enter the command: "sudo service ssh restart".

13.) On your LAN Turtle, make sure the AutoSSH module is "Started" and "Enabled". Reboot your LAN Turtle.

14.) Allow your LAN Turtle to fully reboot (this may take some extra time for AutoSSH to start running).

15.) Finally, from your remote-server, enter into the command-line: "ssh localhost -p 2222". Enter the password for your LAN Turtle when prompted.

You have now successfully SSH'd into your LAN Turtle from a remote-server.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...