Quantcast
Channel: Active questions tagged ssh - Ask Ubuntu
Viewing all articles
Browse latest Browse all 859

Granted ssh access on Network B, but SSH connection refused on network C,

$
0
0

I am new to linux and trying to figure out why do I have this error.

Context: I have a remote home server working on a network at home, which we will call Network A, I access my home server remotely through wireguard. This server runs Ubuntu 24 lts.

In my office I have two Networks a PC and a Laptop.

Yesterday I set up the wireguard connection to Network A and set up SSH access to my remote home server in my PC running Ubuntu 24 lts. This PC still has access to my remote server and work with one of my office's networks that we will call Network B.

In my office we have another Network that we will call Network C.

So I have a laptop running Ubuntu 24 lts connected to network C.

Today I set up the wireguard connection with my Network A, on my laptop which is successful and I can access LAN at home.

but when I try to access my remote home server I receive this error

ssh -vvv nubeOpenSSH_9.6p1 Ubuntu-3ubuntu13.4, OpenSSL 3.0.13 30 Jan 2024debug1: Reading configuration data /home/criss/.ssh/configdebug1: /home/criss/.ssh/config line 1: Applying options for nubedebug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no filesdebug1: /etc/ssh/ssh_config line 21: Applying options for *debug2: resolve_canonicalize: hostname 192.168.0.10 is addressdebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/criss/.ssh/known_hosts'debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/criss/.ssh/known_hosts2'debug3: channel_clear_timeouts: clearingdebug3: ssh_connect_direct: enteringdebug1: Connecting to 192.168.0.10 [192.168.0.10] port 22.debug3: set_sock_tos: set socket 3 IP_TOS 0x10debug1: connect to address 192.168.0.10 port 22: Connection refusedssh: connect to host 192.168.0.10 port 22: Connection refused

In my remote home server log /var/log/auth.log, I don't receive any attempt to login.


When I connect my laptop to network B instead, which my pc is connected to and has access already to my home remote server, and VPN is set up properly cause I can access from my laptop to my LAN at home too, when I try to access my home remote server I actually can! I am granted access to authenticate which I don't want from network B.

OpenSSH_9.6p1 Ubuntu-3ubuntu13.4, OpenSSL 3.0.13 30 Jan 2024debug1: Reading configuration data /home/criss/.ssh/configdebug1: /home/criss/.ssh/config line 1: Applying options for nubedebug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no filesdebug1: /etc/ssh/ssh_config line 21: Applying options for *debug2: resolve_canonicalize: hostname 192.168.0.10 is addressdebug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/home/criss/.ssh/known_hosts'debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts2' -> '/home/criss/.ssh/known_hosts2'debug3: channel_clear_timeouts: clearingdebug3: ssh_connect_direct: enteringdebug1: Connecting to 192.168.0.10 [192.168.0.10] port 22.debug3: set_sock_tos: set socket 3 IP_TOS 0x10debug1: Connection established.

In my remote home server log /var/log/auth.log, I receive a log of attempted login

2024-07-24T10:03:55.760397-05:00 nube sshd[4094]: Connection closed by 172.19.0.2 port 40748 [preauth]

which tells me at least there was an attempt from network B, which doesn't happen on network C.

My question is, in my laptop nothing changes, same VPN connection, same OS.

I can access to my home server from network B, but not from Network C.

What's the difference and how to set it up properly? I want to learn what's going on right now so I can protect my home server in the future.

Thanks in advance and any help will be very much appreciated.


Viewing all articles
Browse latest Browse all 859

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>