https://bugs.kde.org/show_bug.cgi?id=426987

            Bug ID: 426987
           Summary: Android app increments port numbers for SFTP plugin,
                    result is many extra known_hosts keys on desktop.
           Product: kdeconnect
           Version: unspecified
          Platform: Android
                OS: Android 10.x
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: android-application
          Assignee: albertv...@gmail.com
          Reporter: t...@tombrossman.com
  Target Milestone: ---

SUMMARY

If I restart my router, or toggle WiFi off/on on my mobile phone, and the SFTP
auto-connect option is enabled, the Android app increments the port number it
chooses by one, which causes unwanted extra entries in the ~/.ssh/known_hosts
file of the paired desktop Linux machine. If the Android app reused the same
port when reconnecting, this would not happen.

STEPS TO REPRODUCE

1. Pair Android app with desktop Linux machine
2. Enable SFTP (and auto-connect) option
3. After pairing is established, observe one new host key for mobile phone in
desktop machine's known_hosts file
4. Toggle WiFi off/on and wait a moment for app to reconnect SFTP.
5. (optional) Set HashKnownHosts to 'yes' in desktop SSH config file, to
confirm source IP of the redundant lines originates from mobile phone's LAN IP.

OBSERVED RESULT

A new host key appears in the desktop machine's known_hosts file every single
time WiFi + SFTP disconnects and reconnects.

EXPECTED RESULT

The same port should be reused so that only one host key ever appears in the
desktop machine's known_hosts file after WiFi + SFTP disconnects and
reconnects.

SOFTWARE/OS VERSIONS

Android 10
Google Pixel 4
KDE Connect 1.14.2 (From F-Droid)

Ubuntu 20.04.01
GSConnect GNOME Shell extension 

ADDITIONAL INFORMATION

Example sequential host key/port combinations from known_hosts:

[192.168.1.102]:1740 ssh-rsa AAAAB3NzaC1yc...<redacted>
[192.168.1.102]:1741 ssh-rsa AAAAB3NzaC1yc...<redacted>
[192.168.1.102]:1742 ssh-rsa AAAAB3NzaC1yc...<redacted>
[192.168.1.102]:1743 ssh-rsa AAAAB3NzaC1yc...<redacted>

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to