Ssh working in Haiku Alpha 4, can't connect remotely over internet

Trying to log into Haiku computer remotely using ssh, but no luck. I set up ssh using the following guides:

http://www.haiku-os.org/guides/daily-tasks/netservices

and:

http://www.haiku-os.org/community/forum/vnc_server_randomly_stops_working

I tried logging in using a Windows computer running FileZilla and Putty, and also tried a Linux computer. Login to normal FTP on the Haiku machine is successful, and logging into Haiku’s VNC server also works . I set ssh to run at bootup in Haiku. I verified that ssh is running on the Haiku machine using “ps” in Terminal. It just won’t connect, although it looks like it tries because it takes a minute to return a “connection unsuccessful” type of message. Tried changing passwords, etc. Anyone have ideas on what’s wrong? Thanks

I have tried to get ssh to return “connection unsuccessful” and am unable to.

it will return:

ssh: connect to host 192.168.1.2 port 22: Operation would block

with no connection available, or:

ssh: connect to host 192.168.1.2 port 22: Connection refused

when sshd is not running.

Exactly what is your error?

note: 192.168.1.2 is my local ip address, your ip will vary.

Hi,

Thanks for your help. We’d love to get this working; we’re using Haiku 24/7 to run our FM radio station, and every time VNC stops working, it costs me eight dollars in gasoline to drive over and restart it! Now I’m guessing it has something to do with the fact we use a “gotdns.com” domain since our ISP doesn’t give us a static IP address. Here’s what I’ve found so far after playing with it this morning (I changed the domain and IP addresses slightly from what they really are, since this is a public forum):

  1. SSH connection to the station’s desktop Haiku computer is successful at the station itself, using a multi-boot Windows/Linux/Haiku laptop connected to the local network via the ethernet router. I can kill and restart VNC on the station computer via SSH.

  2. Using that setup, I can connect with normal FTP using “wyhi.gotdns.com”, but SSH connection won’t work using that address, I need to use “192.168.1.7” instead which does work. The station’s Haiku network preferences shows “192.168.1.7” as the IP address and “wjhh.gotdns.com” as the domain, with Mode set to “Static”.

  3. Trying to connect with SSH remotely over the internet a few miles away using the same laptop doesn’t work at all; it returns “Operation would block”. Normal FTP works fine.

I looked through Haiku’s sshd_config file in /boot/common/settings/ssh , but not really sure what I’m looking at as far as potential changes to settings.

[quote=bbjimmy]I have tried to get ssh to return “connection unsuccessful” and am unable to.

it will return:

ssh: connect to host 192.168.1.2 port 22: Operation would block

with no connection available, or:

ssh: connect to host 192.168.1.2 port 22: Connection refused

when sshd is not running.

Exactly what is your error?

note: 192.168.1.2 is my local ip address, your ip will vary.[/quote]

Nice :)…

But I think you chould ether come in to #Haiku irc or sen a mail to Haiku list or haiku-dev list.

Can you SSH from that location in to a linux (or windows if it has that)

When it coems to VNC how does it stop working? does the service go down or do it stop working so you need to kill it?

192.168.1.7 is your local ip assigned by your local router. This ip is not accessable from the Internet.

To access the computer over the internet you will need to use the domain name that gotdns.com assigned.

I suspect the whole issue is with your dynamic ip and the vnc server is keeping the connectiuon on you old ip even after the router is assigned a new one.

It is possible that the dynamic dns service, or your isp are blocking the port and stopping the ssh trafic. It is more likely, however, that the router’s firewall is the culprit. Make sure that the your router is not blocking port 22. I use a setting that leves the ip for my haiku boox outside of the router’s firewall. Belkin calls it DMZ, other routers may have a different name but should have a similar setting.

good luck.

Thanks guys, I’ll check to see if port 22 is blocked and post the results. Changed the title, since ssh is working fine under Haiku, don’t want to mislead anyone :slight_smile: