1

I have the following setup:

Computer A has a Wifi-USB adapter (and is a robot, so it doesn't need real internet access). It's running Ubuntu 14.04. Computer B is my Laptop running Ubuntu 14.04 also.

What I have done is setup a local Wifi hotspot on Computer B using this guide. It has an ethernet cable connected to it, which gives it access to the "outside". It works fine, computer A can join the network and I can ping computer A from Computer B and the other way around.

However, I cannot ssh from Computer B to Computer A, I always get the following error.

ssh youbot@ComputerA.local
ssh: connect to host ComputerA.local port 22: Connection refused

To my understanding I do not need to install openssh-server on Computer A, since I am only trying to ssh while in the same network. (Is this correct?)

If I run

sudo iptables -L

I get the follwong output: Computer B:

Chain INPUT (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     udp  --  anywhere             anywhere             udp dpt:bootps
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:bootps
ACCEPT     udp  --  anywhere             anywhere             udp dpt:domain
ACCEPT     tcp  --  anywhere             anywhere             tcp dpt:domain

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             10.42.0.0/24         state RELATED,ESTABLISHED
ACCEPT     all  --  10.42.0.0/24         anywhere            
ACCEPT     all  --  anywhere             anywhere            
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable
REJECT     all  --  anywhere             anywhere             reject-with icmp-port-unreachable

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination       

Computer A:

Chain INPUT (policy ACCEPT)
target        prot opt source                destination

Chain FORWARD (policy ACCEPT)
target        prot opt source                destination

Chain OUTPUT (policy ACCEPT)
target        prot opt source                destination

I have ufw disabled on both computers. Since I am really not a ssh expert, can anybody tell me what I can do to fix this?

If further information is needed, I'd be glad to provide it.

2

Ok, apparently I do need openssh-server on Computer A, even though I am in the same network. I read that wrong somewhere else then.

  • Yes. The ssh server allows the machine to accept incoming connections, which is what you're trying to do. – arensb Jun 13 '16 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.