Comments (8)
I have noticed that when TurboVNC Viewer is configured to operate with an agent (ssh-agent or pageant) it automatically loads all of the private keys in the
~/.ssh
directory and adds them to the agent. This is not the expected behaviour as by default keys should not be added to the agent.
How did you reach that conclusion? I don't see any such code, and if I do ssh-add -D
to remove all keys from ssh-agent, the TurboVNC Viewer prompts me for an SSH password, as I would expect.
from turbovnc.
I add two specific keys to my ssh-agent manually, from a directory other than .ssh
. Then I run TurboVNC and the key in my .ssh/id_rsa
file then appears in the output of ssh-add -l
. If I remove the file .ssh/id_rsa
file before running TurboVNC then it isn't added to the agent. The key is not added to the agent when I run the standard ssh command line utility.
I believe the relevant code is here:
turbovnc/java/com/jcraft/jsch/Session.java
Line 2741 in ff35d99
and:
turbovnc/java/com/jcraft/jsch/JSch.java
Lines 500 to 505 in ff35d99
from turbovnc.
Maybe the behaviour only triggers if the agent is not empty?
from turbovnc.
I'll look into that, but I don't think that's the ultimate cause of the failure. I can reproduce a problem that has the same symptoms as what you are describing, and I don't have ~/.ssh/id_rsa. The SSH server on my TurboVNC host has MaxAuthTries
set to 6. That means that connecting to the SSH server should work if the private key for my account on the host is in the 6th position or lower in the list of keys offered by ssh-agent. Such is the case with OpenSSH, but with the TurboVNC Viewer, the connection fails if the key is in the 3rd position or higher. If I list all of the identities registered with JSch right before the SSH connection is opened, I only get back the list offered by ssh-agent, and there are no duplicates. However, I think the issue is that, since d6ae34d, the SSH client is trying each of the ssh-rsa, rsa-sha2-256, and rsa-sha2-512 signature schemes in sequence for each key, so there are three auth failures instead of one. I agree also that ~/.ssh/id_rsa shouldn't be duplicated. I'll look into both issues tomorrow.
from turbovnc.
Ahh, that does sound more likely. I suppose I should have checked my server logs to find exactly what was being sent.
Thankyou.
from turbovnc.
I think this simple fix will eliminate the key duplication problem:
index c5ecf564..fe5454b7 100644
--- a/java/com/jcraft/jsch/JSch.java
+++ b/java/com/jcraft/jsch/JSch.java
@@ -477,7 +477,7 @@ public class JSch{
the same fingerprint already exists with a passphrase. */
Identity decryptedIdentity=findDecryptedIdentity(identity);
if(decryptedIdentity!=null){
- identity=decryptedIdentity;
+ return;
}
}
However, I'm still struggling with the other problem. I hoped that porting mwiede/jsch@e1fc360 into our JSch implementation would fix it, but no such luck. I am still trying to figure out whether the JSch fork experiences the same issue or whether I just need to port some additional code from the fork.
from turbovnc.
I've figured it all out. I'm just developing an automated test that iterates through various permutations of private key configurations, to guard against future regression. I should have everything fixed early next week.
from turbovnc.
Should now be fixed. GitHub Actions is derping for some reason, so only Windows and macOS pre-release builds are available with the changes at the moment.
from turbovnc.
Related Issues (20)
- vncserver: Wrong type or access mode of /home/tyiot/.vnc HOT 6
- VNCserver cannot start, log prompt Killing Xvnc process ID HOT 4
- Internal SSH client does not support all features of ~/.ssh/config, ProxyJump/ProxyCommand HOT 3
- Consider switching to building with zlib-ng HOT 3
- how do i start turbovnc server automatically on ubuntu 22.04? HOT 1
- Release separate assets for vncviewer and vncserver installers HOT 1
- Can't seem to bring up TurboVNC session on Ubuntu w/ ARM HOT 7
- podman containers fail to start through TurboVNC session HOT 4
- How to configure turbovnc as a systemd service (ubuntu 20.04) HOT 1
- the UI of Display Settings dialog is messy after changing custom scale HOT 2
- Install fails HOT 3
- Can't start TurboVNC in Ubuntu GNOME desktop HOT 10
- JRELoadError with arm64 Mac - version 3.1.1 HOT 3
- Can the software increase support for file copying HOT 1
- No value for `$wm` working HOT 4
- Session Manager behaviour with UDS listening sessions HOT 4
- Browser and other applications missing on Virtual Desktop HOT 12
- Session Manager Error HOT 3
- java.lang.IllegalArgumentException: Value too long HOT 6
- Guidance needed: Trying to get TurboVNC to only serve a single monitor HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from turbovnc.