Problems Creating SSH Connection in One Direction but no the Other

eborduas

Cadet
Joined
Nov 2, 2020
Messages
9
I have 2 TrueNAS installation, freenas and truenas-rep which are connect as shown in the below network diagram.

SSH_issue.png

I am able to create an SSH Connection from freenas to truenas-rep over both the 192.168.1.1/24 and 192.168.1.3/24 networks. But cannot create an SSH Connection from truenas-rep to freenas over either networks.

I can ping truenas-rep from freenas over both netwroks and the reverse as well.

Code:
freenas% ping 192.168.3.2
PING 192.168.3.2 (192.168.3.2): 56 data bytes
64 bytes from 192.168.3.2: icmp_seq=0 ttl=64 time=1.500 ms

freenas% ping 192.168.1.250
PING 192.168.1.250 (192.168.1.250): 56 data bytes
64 bytes from 192.168.1.250: icmp_seq=0 ttl=64 time=0.215 ms

truenas-rep% ping 192.168.3.1
PING 192.168.3.1 (192.168.3.1): 56 data bytes
64 bytes from 192.168.3.1: icmp_seq=0 ttl=64 time=1.587 ms

truenas-rep% ping 192.168.1.253
PING 192.168.1.253 (192.168.1.253): 56 data bytes
64 bytes from 192.168.1.253: icmp_seq=0 ttl=64 time=0.217 ms


When I attempt to create an SSH Connection from truenas-rep to freenas over either networks I get the following error:

SSH_CON.JPG

Code:
Error: Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 139, in call_method
    result = await self.middleware._call(message['method'], serviceobj, methodobj, params, app=self)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1247, in _call
    return await self.run_in_executor(prepared_call.executor, methodobj, *prepared_call.args)
  File "/usr/local/lib/python3.9/site-packages/middlewared/main.py", line 1152, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
  File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/schema.py", line 985, in nf
    return f(*args, **kwargs)
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/keychain.py", line 584, in remote_ssh_semiautomatic_setup
    raise CallError(f"Semi-automatic SSH connection setup failed: {e!r}")
  File "/usr/local/lib/python3.9/site-packages/middlewared/plugins/keychain.py", line 573, in remote_ssh_semiautomatic_setup
    raise CallError("Invalid password")
middlewared.service_exception.CallError: [EFAULT] Invalid password


The password is correct since I can use it, the password, to log into the web UI. I've tried with a different username/password and the same error is generated.

My goal is to establish pull replication from truenas-rep but the above error is preventing that and for now I need to settle for push replication from freenas.

Any suggestions?
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Are you able to connect to the ssh manually on the CLI? Also, use the -v flag for more debug output.
 

eborduas

Cadet
Joined
Nov 2, 2020
Messages
9
I was able to workaround the issue by using the manual key creation and adding the public key to the root user's authorized_keys on the freenas name NAS.
 

eborduas

Cadet
Joined
Nov 2, 2020
Messages
9
Are you able to connect to the ssh manually on the CLI? Also, use the -v flag for more debug output.
Yes, I was able to connect from the CLI without any issues. I found that manually creating the key and adding it to the target root user's authorized_keys file worked.
 
Top