Error: Failed to load HostKeys from home p .ssh known_hosts. - binbash23/p GitHub Wiki
If you try to connect to a new ssh host, you might get this error:
[razpass db] pshell> mergew deeps
pysftp/__init__.py:61: UserWarning: Failed to load HostKeys from /home/p/.ssh/known_hosts. You will need to explicitly load HostKeys (cnopts.hostkeys.load(filename)) or disableHostKey checking (cnopts.hostkeys = None).
Error: No hostkey for host deeps found.
Exception ignored in: <function Connection.__del__ at 0x7f9aa860c0>
Traceback (most recent call last):
File "pysftp/__init__.py", line 1013, in __del__
File "pysftp/__init__.py", line 784, in close
AttributeError: 'Connection' object has no attribute '_sftp_live'
To enable the connection you will need to connect to the target ssh host or you will at least have to accept the host key. You can do this with connecting to the host with putty (windows) or like this (linux): Type in the pshell
!bash
Then use the linux ssh command to accept the remote host key where [remote_host] has to be the name of the ssh host you want to connect to:
ssh [remote_host]
Then you type "yes" when you are asked if you want to trust the remote hostkey:
p@razpass:~/p$ ssh remote-host
The authenticity of host 'remote-host (192.168.1.99)' can't be established.
ED25519 key fingerprint is SHA256:IqoqrHoQxxxxxxxxxxxxxxxxxxxxxRC7oAqYwl+Ks.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
After this you do not have to enter the remote password because the remote hostkey is already accepted. Type "exit" to return to the pshel and try to merge to the ssh target again.