This should be so simple! All computers are running leap 15. I have set up a headless server and am able to log into it using ssh. I want to be able to do the same to the other computers on my network, but only from my own network. I have looked at all the files I can find on the server and on the other computers and can’t seem to find any differences.
When I log onto the server, I open Konsole and type:
ssh 192.168.3.4 -l <username>
There is a user of that name on the server. I am prompted for a password, which I enter and I get the welcome message.
When I try to connect to another computer, using the same method, I get no response and have to press Ctrl C to get the prompt back.
I don’t need or want a graphic interface, simply access using Konsole.
And, important, I do not want access from outside my own network.
Have you checked that sshd is running on those computers? Also, if you have an active firewall on each those hosts you wish to reach, make sure port 22 is open.
Well, that solved the problem on one computer. Another one is still refusing connections. Yast says the firewall is not active and is not enabled. I did a reboot just because, still not accepting.
Not really - both should report (consistently) if sshd is active or not. My main point was for those (including me) who don’t have netstat installed, lsof can be used instead.
While that may be true, I somehow don’t think the OP is dong that, and just so you know Henk , since the release of openSUSE Leap 15 the xinetd services are no longer present anyway.
I think your first point (using lsof) is very valid. I am afraid that (having it and it’s friends installed) use them like I did for 30 - 40 years and do not always think about not everybody having them by default >:(.
I do also not think he is using xinetd, but checking the open port is in any case the first thing I would do. After all, if it is sshd or xinetd, in both cases it should work. And the netstat -tulp (I do not know about lsof) would show which of them it is, to work on further.
It is a different work flow by habit I assume. I am more of the step by step approach, because next step may depend very much on the outcome of the first.
which then reports the daemon/process associated with it
It is a different work flow by habit I assume. I am more of the step by step approach, because next step may depend very much on the outcome of the first.
Port and daemon are both useful things to check. For all I know the OP may have configured /etc/ssh/ssh_config to listen on a different port (but unlikely I think).
> My main point was for those (including me) who don’t have netstat
> installed, lsof can be used instead.
As the “old” nettools (ipconfig, netstat, route …) have been deprecated by
the tools from iproute2, one should also mention the “ss” (socket statistics)
command as this one seems to be the replacement for netstat.
/usr/sbin/ss -tulpen
AK
–
Never attribute to malice that which can be adequately explained by stupidity.
(R.J. Hanlon)
lsof reports the same as your sample. I admit I used your code rather than copy and paste and sneaket-net mine. The difference is in the PID and device number only. I see this as proof that port 22 is open and sshd is running. So, I should be able to connect, Correct?
Can you successfully ping the host in question? If so, try running an nmap scan of the host from another machine on the network
nmap <IP address of host>
For example, I get
~> nmap 192.168.1.4
Starting Nmap 7.70 ( https://nmap.org ) at 2018-07-29 10:50 NZST
Nmap scan report for linux-n8nk (192.168.1.4)
Host is up (0.012s latency).
Not shown: 993 closed ports
PORT STATE SERVICE
22/tcp open ssh
139/tcp open netbios-ssn
445/tcp open microsoft-ds
631/tcp open ipp
5801/tcp open vnc-http-1
5901/tcp open vnc-1
6001/tcp open X11:1
Nmap done: 1 IP address (1 host up) scanned in 0.41 seconds
At the SSH server end, you could watch the sshd service
sudo journalctl -fu ssh
then attempt to start an ssh session from another machine and watch the subsequent output generated.
At the SSH server end, you could watch the sshd service
Code:
sudo journalctl -fu ssh
then attempt to start an ssh session from another machine and watch the subsequent output generated.
I tried this and got absolutely no response other than the line stating the log had been started and showing the date.
As this computer has a unique, to me, system board, I poked around in the bios but as expected, didn’t see anything I thought would contribute to this problem.
Well, that indicates that a firewall on that host is dropping traffic to all the scanned ports. So you need to check that out further. What OS/version is running on that host?