Jump to content

Auto ssh Headache


AvidPontoon

Recommended Posts

Hello

I am using autoshh on the lan turtle and have setup the config to connect to my lan turtle on port 8888 then I generated a key and copied it to my VPS. This all worked and I was able to connect upon starting autossh in that same session, but after I rebooted the lan turtle I cannot get a ssh session with it. It will give me either "connection reset by peer" and then "connection refused" or just straight up connection refusal. 

 

What am I doing wrong? This has been driving me insane. There is no firewall on the vps blocking the outbound connection either.

Link to comment
Share on other sites

16 hours ago, AvidPontoon said:

Hello

I am using autoshh on the lan turtle and have setup the config to connect to my lan turtle on port 8888 then I generated a key and copied it to my VPS. This all worked and I was able to connect upon starting autossh in that same session, but after I rebooted the lan turtle I cannot get a ssh session with it. It will give me either "connection reset by peer" and then "connection refused" or just straight up connection refusal. 

 

What am I doing wrong? This has been driving me insane. There is no firewall on the vps blocking the outbound connection either.

Did you seg autossh to autostart? That's not on by default, but can be configured in the same menu where you stared it. The option is marked as "enable". 

Link to comment
Share on other sites

10 hours ago, Sebkinne said:

Did you seg autossh to autostart? That's not on by default, but can be configured in the same menu where you stared it. The option is marked as "enable". 

Yes it is enabled on the menu I'm still stuck with connection refused tho :/

Link to comment
Share on other sites

  • 4 weeks later...

This happened to me too.  With great frustration I wasn't able to SSH in, I even completely disabled the firewall for a little while but that didn't work.  In the end I realised that I needed to wait more than 30 seconds for the Turtle to boot.  For whatever reason, mine was being a little slow.  So maybe try plugging in the turtle, and then wait 10 minutes.  Once I did that, the Turtle has been working fine (and booting up after 30 -40 seconds as usual).

 

Link to comment
Share on other sites

6 hours ago, Rurn said:

This happened to me too.  With great frustration I wasn't able to SSH in, I even completely disabled the firewall for a little while but that didn't work.  In the end I realised that I needed to wait more than 30 seconds for the Turtle to boot.  For whatever reason, mine was being a little slow.  So maybe try plugging in the turtle, and then wait 10 minutes.  Once I did that, the Turtle has been working fine (and booting up after 30 -40 seconds as usual).

 

I'm having the same problem and it still won't allow a connection even after waiting a long time. For whatever reason, if autossh was started when I unplug turtle the next time I plug it in I can't connect. If I stop the autossh service before unplugging it works fine when plugged in next time. Thought? Ideas?

Link to comment
Share on other sites

51 minutes ago, Magneto417x said:

I'm having the same problem and it still won't allow a connection even after waiting a long time. For whatever reason, if autossh was started when I unplug turtle the next time I plug it in I can't connect. If I stop the autossh service before unplugging it works fine when plugged in next time. Thought? Ideas?

Whats your setup?

Link to comment
Share on other sites

Lan Turtle with Ubuntu 16.10 in cloud. I have root access. Like I said it works if you shutdown autossh and then unplug and plug back in.  What else do you need to know about setup?

 

Lan Turtle is default just like Darren does in video. 

Remote Port 2222

port 22

Link to comment
Share on other sites

  • 1 year later...
  • 1 month later...

I have this problem and for some reason, autossh adds an apostrophe ( ' ) to the end of the port variable after the turtle is turned off. I have no idea how to fix this but it seems to be the problem.

To fix it you have to remove the comma from the autossh config after every startup. Hopefully, they fix this soon.

 

Link to comment
Share on other sites

  • 3 months later...
  • 3 weeks later...
On 12/19/2018 at 7:07 PM, mule said:

AutoSSH doesn't work for me once I've unplugged it from my USB port on my local machine. Any way to modify the single quote mark out of the config for AutoSSH?

Even though the single tick appears in the field, if you backspace over it and save, you can get AutoSSH to run.  The backtick will appear again when you look at the config, but AutoSSH will work, regardless.

Link to comment
Share on other sites

  • 1 month later...

I'm having trouble getting the LANturtle to connect with ssh, I can get the key to set and I can ping from the turtle to the Cloud IP address but I can not connect to the turtle from my Cloud IP address. I did notice that in the video explaining how to set it up there were only 3 options in set up after the keys are set and I have options host, port, port and port. Does anyone have an idea on what to do?

 

Link to comment
Share on other sites

Remember that you can exit out of the turtle menu to a command prompt.  Then cd /etc/turtle/autostart_modules.   Cat the 99-autossh module and check out the commands that are running.  Copy/paste them into the command line to try them yourself.  You'll likely see what the error is and then "Oh dang!", and fix it that way...

You can also do a "ps" from the command line, and see the services/commands that are running, that might give you a hint as well. 

Also check your disk space with "df -h", see how much space rootfs has "Available".  If it's critically low, things won't work right.  You can do a "du -sh /*" to see which folders at the root level are full.  cd into that folder, run it again, etc...til you find the culprit.

 

 

Link to comment
Share on other sites

  • 1 month later...

In my current testing, I've had some of the same issues with autossh.  The biggest problem I have found, is that once you get the initial connection, the ports stay open on the receiving linux host (not the turtle).  So, when turtle tries to create the connection back on 2222, it's already in use, and it dies a horrid death.

My fix, is to edit your /etc/ssh/sshd_config options on your receiving host, to alter the keepalives.  If not, those ports will stay open for an arbitrary amount of time and drive you to drink...more...  Here's my settings:

    vi /etc/ssh/sshd_config
         TCPKeepAlive yes
         ClientAliveInterval 15 (checks every 15 seconds, if ssh conn is dead, kills it)
         ClientAliveCountMax 3 (just check 3 times)
 
You have to enable the KeepAlives, then have it check (mine every 15 seconds).  If there's no connection on the ports, it will close out those ports.  The next turtle insertion will work fine.  
I beat my head on this for a couple of hours, and checked the /var/log/auth.log and found these:
 
Apr 24 07:38:34 callhome sshd[7408]: error: bind [127.0.0.1]:20000: Address already in use
Apr 24 07:38:34 callhome sshd[7408]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 20000
Apr 24 07:38:34 callhome sshd[7408]: error: bind [127.0.0.1]:2222: Address already in use
Apr 24 07:38:34 callhome sshd[7408]: error: channel_setup_fwd_listener_tcpip: cannot listen to port: 2222
 
Happy hunting!
 
 
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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