SSH not working after Samba install

yugpatel

Senior member
Feb 28, 2001
506
0
76
I have desktop running:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
IP 192.168.1.111 (static)

I have server running:
Distributor ID: Ubuntu
Description: Ubuntu 14.04.1 LTS
Release: 14.04
Codename: trusty
IP 192.168.1.113 (static)

On server I have configured /etc/ssh/sshd_config to include AllowUsers xyz.

Since installed Samba server using guide at https://www.digitalocean.com/community/tutorials/how-to-set-up-an-nfs-mount-on-ubuntu-14-04, I can not ssh any more.
I removed Samba usinf sudo apt-get --purge remove nfs-kernel-server nfs-common
but still can not SSH.

What am I doing wrong?

I can ping to my server 192.168.1.113

Error message: "ssh: connect to host 192.168.1.113 port #some_number: Connection timed out"
 

CubanlB

Senior member
Oct 24, 2003
562
0
76
checking /var/log/auth.log will let you know why the auths are failing if you are even getting to that point.

You should be able to execute a telnet <serverIP> <SSHPort> and get the ssh version info back.

(e.g. telnet 192.169.1.113 22)

If you do not even get this you may have a network issue. Installing samba maybe reconfigured UFW and turned it back on (If you turned it off or configured it). Since this is in the same subnet it's most likely a firewall issue if you think your sshd config is correct.

try on the server to ssh into the loop back and local address. ssh 127.0.0.1 or ssh 192.168.1.113.

Also, nfs-kernel-server nfs-common are not related to Samba, that is Network File System installs. Samba is related to creating CIFS shares from a nix box for windows clients.
 
Last edited:

yugpatel

Senior member
Feb 28, 2001
506
0
76
try on the server to ssh into the loop back and local address. ssh 127.0.0.1 or ssh 192.168.1.113.

First of all ssh_config was edited with port number and allousers entries by error. Hence I fixed it. Then I did ssh -p portnumber 192.168.1.113 from the server itself and it worked fine. Hence, tried from client (desktop) but no go.

Ping from client to server works fine.

UFW on server is inactive. I also set ufw rules to default on client but still no go.

Thanks both of you for the reply.
Let me know what is next.
 

CubanlB

Senior member
Oct 24, 2003
562
0
76
ssh_config is your client config. sshd_config is the server config.

All pinging the server is telling that it is reachable on the network with icmp.

Did you try to get the server ssh info via telnet?

Did you check the authentication logs?
 

yugpatel

Senior member
Feb 28, 2001
506
0
76
All pinging the server is telling that it is reachable on the network with icmp.

Did you try to get the server ssh info via telnet?

Did you check the authentication logs?

Telnet gives me the following response:
Trying 192.168.1.113...
telnet: Unable to connect to remote host: Connection timed out

auth log does not have error message or anything else pertaining to ssh.
 

CubanlB

Senior member
Oct 24, 2003
562
0
76
did you put the ssh port at the end of the telnet command?

Where ever sshd is logging auths to should have some entries if you can connect to to ssh locally.

So possibly wrong log file?
 

yugpatel

Senior member
Feb 28, 2001
506
0
76
did you put the ssh port at the end of the telnet command?

Where ever sshd is logging auths to should have some entries if you can connect to to ssh locally.

So possibly wrong log file?

iptables -A INPUT -p tcp --dport port# -j ACCEPT did the trick.

Though I am surprised that if firewall status was inactive, how comes rules are still in effect?

Now I have to figure out to configure ftp as fileZilla does not work. Any suggestion? I have read guide on vsftpd http://www.ubuntugeek.com/setup-ftp...ions-using-tlsssl-on-ubuntu-14-04-server.html and still having issues. I guess because of iptables also.
 

CubanlB

Senior member
Oct 24, 2003
562
0
76
how have you been configuring iptables? ufw is the default configuration utility for iptables in ubuntu.

https://wiki.ubuntu.com/UncomplicatedFirewall

Just know that you need to configure your firewall for applications you are trying to setup. This is a better option than just turning the host firewall off.