mirror of
https://github.com/vale981/rmview
synced 2025-03-05 09:11:39 -05:00
Update some log statements, add a comment on slow host loading.
This commit is contained in:
parent
3b3dcecdb4
commit
c26efcdead
3 changed files with 18 additions and 2 deletions
12
README.md
12
README.md
|
@ -145,6 +145,18 @@ If you use the "Add/Update" feature when prompted by rMview (for example after a
|
|||
:warning: **Key format error:**
|
||||
If you get an error when connect using a key, but the key seems ok when connecting manually with ssh, you probably need to convert the key to the PEM format (or re-generate it using the `-m PEM` option of `ssh-keygen`). See [here](https://github.com/paramiko/paramiko/issues/340#issuecomment-492448662) for details.
|
||||
|
||||
NOTE: If you have a lot of known hosts in system known hosts file (`~/.ssh/known_hosts`), you are advised to add
|
||||
known host entry for remarkable to `~/.config/rmview_known_hosts` because paramiko can be very slow when loading
|
||||
large known hosts file which slows down the whole connection routine.
|
||||
|
||||
If your user system known hosts file already contains entry for remarkable, you can add it to rmview specific
|
||||
hosts file using this command:
|
||||
|
||||
```bash
|
||||
cat ~/.ssh/known_hosts | grep 10.11.99.1 >> ~/.config/rmview_known_hosts
|
||||
```
|
||||
|
||||
You should of course replace IP with your remarkable IP.
|
||||
|
||||
## To Do
|
||||
|
||||
|
|
|
@ -76,15 +76,18 @@ class rMConnect(QRunnable):
|
|||
|
||||
if host_key_policy != "ignore_all":
|
||||
if known_hosts and os.path.isfile(known_hosts):
|
||||
log.info("Using known hosts file: %s" % (known_hosts))
|
||||
self.client.load_host_keys(known_hosts)
|
||||
log.info("LOADED %s", known_hosts)
|
||||
else:
|
||||
log.info("Using system default known hosts file")
|
||||
# ideally we would want to always load the system ones
|
||||
# and have the local keys have precedence, but paramiko gives
|
||||
# always precedence to system keys
|
||||
# There is extremly slow in system with many known host entries... :/
|
||||
# See https://github.com/paramiko/paramiko/issues/191
|
||||
self.client.load_system_host_keys()
|
||||
|
||||
|
||||
policy = HOST_KEY_POLICY.get(host_key_policy, RejectNewHostKey)
|
||||
self.client.set_missing_host_key_policy(policy())
|
||||
|
||||
|
|
|
@ -101,6 +101,7 @@ class FrameBufferWorker(QRunnable):
|
|||
|
||||
@pyqtSlot()
|
||||
def run(self):
|
||||
log.info("Starting VNC server")
|
||||
try:
|
||||
_,_,out = self.ssh.exec_command("$HOME/rM-vnc-server-standalone")
|
||||
log.info(next(out))
|
||||
|
@ -108,7 +109,7 @@ class FrameBufferWorker(QRunnable):
|
|||
self.signals.onFatalError.emit(e)
|
||||
|
||||
while self._stop == False:
|
||||
log.info("Starting VNC server")
|
||||
log.info("Establishing connection to remote VNC server")
|
||||
try:
|
||||
self.vncClient = internet.TCPClient(self.ssh.hostname, 5900, RFBFactory(self.signals))
|
||||
self.vncClient.startService()
|
||||
|
|
Loading…
Add table
Reference in a new issue