Re: openssh server remote access
On Thu, Oct 21, 2021 at 09:07:02PM +0000, Semih Ozlem wrote:
> Yes the error message is
>
> ssh: connect to host (ip address of remote host) port 22: Connection refused
This message means one of these things:
1) The sshd process is not running, or is not listening on the default port.
2) A firewall is preventing your connection.
You would normally check the first thing by using "ss" or "netstat" on
the server, and verifying that the process is indeed LISTEN-ing on the
expected interface(s) and port. For example:
unicorn:~$ ss -ant | grep :22
LISTEN 0 128 0.0.0.0:22 0.0.0.0:*
[...]
This tells me that something is listning on port 22 on all IPv4 interfaces.
If you don't see a line like this, then you need to investigate the ssh
service more deeply. Perhaps start by running "journalctl -u ssh" to
read its logs.
If you *do* see a line like this, then you need to look at network-level
stuff, like firewalls, routers, and so on.
Reply to: