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.
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.
> 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.
Never attribute to malice that which can be adequately explained by stupidity.
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.