From: Adam T. B. <ad...@ag...> - 2012-11-22 11:12:55
|
Hi Brad, Java can't talk to the ssh-agent because it uses UNIX domain sockets to communicate and Java doesn't have any native concept of this type of socket, although there is now a third party library that can do it (apparently): http://code.google.com/p/junixsocket/ Perhaps the developer of the FTP plugin could look into using it. Back to the password issue: Have you tried tracing the jedit process to see what happens after the password is submitted? I haven't used the trace commands on OSX (I use strace on Linux) but the command you would use would be something like: dtruss -f jedit If you redirect the output to a file you can then search through the output for the names of your key files to see if they are stat()-ed or open()-ed at all. Worth a try. Adam On 21/11/12 15:11, Brad Smith wrote: > Oh, another suggestion, though perhaps differences between OSes would > make this difficult: jEdit doesn't seem to try to talk to the ssh agent > for key information. Having that ability would both be more convenient > and (hopefully) make issues like this moot. > > --Brad > > > On Wed, Nov 21, 2012 at 10:09 AM, Brad Smith <use...@gm... > <mailto:use...@gm...>> wrote: > > Thanks for the suggestions Adam. Sadly, removing the .jedit dir (or > in my case ~/Library/jEdit/, since I'm on MacOS) did not resolve the > problem, which at least gives us some more information, I guess. > > I've been comparing the problem key with one that works on another > server, and the permissions are exactly the same, so I don't think > it's a permissions issue, and I've used tcpdump to confirm that > jEdit isn't even talking to the ssh server when it repeatedly > prompts for my passphrase, so which proto versions are supported on > the server don't enter into it (they should both be ssh 2 keys anyway). > > The only difference I can find is that the working key is shorter > than the non-working one, but the non-working one is 2048 bits and I > am almost certain that previous working keys were that long, and I'd > be surprised if the plugin had a max key length. Still, if straws > are all I have to grasp at... Alan (or someone else with dev > knowledge of the plugin) can you confirm? > > One suggestion that might be worth taking from this, for the devs: > the passphrase rejections generate no log messaging whatsoever, > either to the Activity Log or to stdout when I run jEdit from the > command line. Whatever the issue turns out to be, some kind of > diagnostic message when a passphrase is reject would be helpful. > > Thanks again to all who've tried to help. I remain open to any other > troubleshooting suggestions. :( > > --Brad > > > On Tue, Nov 20, 2012 at 4:02 AM, Adam T. Bowen <ad...@ag... > <mailto:ad...@ag...>> wrote: > > Hi Brad, > > Have you tried temporarily moving your entire .jedit settings > directory out of the way and setting up the connection from > scratch? It would entirely rule out any sort of cached data or > old settings issue if it still couldn't connect. > > If it works, then you have to decide whether to spend time > trying to sniff out the offending setting/cache file, or you can > just set things up again from scratch. Whichever is less painful > I suppose. > > A couple of other thoughts: > > * It could be a file permissions issue. What are the permissions > on your .ssh directory and key files? Local and remote. I know > you say it works from the command line, but it is a different > client, and may have different file permission requirements. > > * What SSH protocols does the server support? I presume the Java > client used in the FTP plugin supports both versions 1 and 2 of > the SSH protocol. Presumably so does your server, but worth > checking. > > Cheers, > > Adam > > > On 19/11/12 18:43, Alan Ezust wrote: > > According to the event log, the wrong passphrase is being > entered, or > the dialog is being closed without a passphrase. > But it is using a key, that is apparent (although you > sanitized the > paths so only you can know for sure if it is using the > correct key!). > Anyway, I am unable to reproduce your problem now. > > On Mon, Nov 19, 2012 at 10:30 AM, Brad Smith > <use...@gm... <mailto:use...@gm...> > <mailto:usernamenumber@gmail.__com > <mailto:use...@gm...>>> wrote: > > Unfortunately I do not. Also, given that jEdit keeps > prompting me > for the passphrase and my reading of the event log, I > don't think > we're even reaching the point where the key is actually > being used > for authentication. > > Thanks for the response nonetheless, > --Brad > > > On Mon, Nov 19, 2012 at 10:40 AM, Colin Law > <cl...@go... <mailto:cl...@go...> > <mailto:cl...@go... > <mailto:cl...@go...>__>> wrote: > > On 19 November 2012 15:30, Brad Smith > <use...@gm... <mailto:use...@gm...> > <mailto:usernamenumber@gmail.__com > <mailto:use...@gm...>>> wrote: > > Well I went and got my hopes up, but no luck so > far. Any > suggestions for > > troubleshooting further? And yes, ssh-add + > regular ssh from > CLI works fine. > > > > Here's the activity log, slightly sanitized by > replacing > username, hostname, > > and keyname, though I don't think it's going to > be of much > help. The big > > Java error at the bottom is just me clicking > Cancel after a > failed attempt > > to enter the key's passphrase. > > Have a look at the ssh log on the server if you > have access to > it, it > may tell you something. > > Colin > > > > > Thanks for the response, and for any help you > can offer! > > > > --Brad > > > > 10:23:06 AM [AWT-EventQueue-0] [debug] FtpVFS: > > > > FtpVFS.createVFSSession(sftp:/__/USERNAME@MYHOSTNAME:22/u0/__USERNAME, > > > > org.gjt.sp.jedit.browser.__BrowserView[,0,116,892x667,__invalid,layout=java.awt.__BorderLayout,alignmentX=0.0,__alignmentY=0.0,border=javax.__swing.border.EmptyBorder@__5ee819a8,flags=9,maximumSize=,__minimumSize=,preferredSize=]) > > 10:23:06 AM [AWT-EventQueue-0] [debug] String: > > sftp://USERNAME@MYHOSTNAME:22/__u0/USERNAME > > 10:23:06 AM [jEdit Worker #2] [debug] > ConnectionManager: > Thread[jEdit Worker > > #2,6,jEdit Workers]: Connecting to > sftp://MYHOSTNAME:22 > > 10:23:06 AM [jEdit Worker #2] [debug] > SFtpConnection: > > info.privateKey=/Users/__USERNAME/.ssh/PATH/TO/KEY > > 10:23:06 AM [jEdit Worker #2] [debug] > SFtpConnection: Using key: > > /Users/USERNAME/.ssh/PATH/TO/__KEY > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > Connecting to MYHOSTNAME > > port 22 > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > Connection established > > 10:23:06 AM [jEdit Worker #2] [message] > SftpLogger: Remote > version string: > > SSH-1.99-OpenSSH_5.3p1 Debian-3ubuntu7 > > 10:23:06 AM [jEdit Worker #2] [message] > SftpLogger: Local > version string: > > SSH-2.0-JSCH-0.1.42 > > 10:23:06 AM [jEdit Worker #2] [message] > SftpLogger: CheckCiphers: > > > > aes256-ctr,aes192-ctr,aes128-__ctr,aes256-cbc,aes192-cbc,__aes128-cbc,3des-ctr,arcfour,__arcfour128,arcfour256 > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > SSH_MSG_KEXINIT sent > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > SSH_MSG_KEXINIT received > > 10:23:06 AM [jEdit Worker #2] [message] > SftpLogger: kex: > server->client > > aes128-ctr hmac-md5 none > > 10:23:06 AM [jEdit Worker #2] [message] > SftpLogger: kex: > client->server > > aes128-ctr hmac-md5 none > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > SSH_MSG_KEXDH_INIT sent > > 10:23:06 AM [jEdit Worker #2] [message] > SftpLogger: expecting > > SSH_MSG_KEXDH_REPLY > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > ssh_rsa_verify: > > signature true > > 10:23:06 AM [jEdit Worker #2] [message] > SftpLogger: Host > 'MYHOSTNAME' is > > known and mathces the RSA host key > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > SSH_MSG_NEWKEYS sent > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > SSH_MSG_NEWKEYS received > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > SSH_MSG_SERVICE_REQUEST > > sent > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > SSH_MSG_SERVICE_ACCEPT > > received > > 10:23:06 AM [jEdit Worker #2] [message] SftpLogger: > Authentications that can > > continue: publickey,keyboard-__interactive,password > > 10:23:06 AM [jEdit Worker #2] [message] > SftpLogger: Next > authentication > > method: publickey > > 10:23:06 AM [jEdit Worker #2] [debug] > SFtpConnection: > Passphrase for > > /Users/USERNAME/.ssh/PATH/TO/__KEY > > 10:23:06 AM [jEdit Worker #2] [debug] > SFtpConnection: > Passphrase for > > /Users/USERNAME/.ssh/PATH/TO/__KEY > > 10:23:11 AM [jEdit Worker #2] [debug] > SFtpConnection: > Passphrase for > > /Users/USERNAME/.ssh/PATH/TO/__KEY > > 10:23:12 AM [AWT-EventQueue-0] [debug] EditBus: > > DynamicMenuChanged[menu=__recent-files,source=null] > > 10:23:12 AM [AWT-EventQueue-0] [debug] EditBus: > > DynamicMenuChanged[menu=__recent-files,source=null] > > 10:23:14 AM [jEdit Worker #2] [message] SftpLogger: > Disconnecting from > > MYHOSTNAME port 22 > > 10:23:14 AM [jEdit Worker #2] [debug] > ConnectionManager: catch > > java.io.IOException on sftp://MYHOSTNAME:22 > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: > > java.io.IOException: > com.jcraft.jsch.JSchException: Auth cancel > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: at > > ftp.SFtpConnection.<init>(__SFtpConnection.java:107) > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: at > > > ftp.ConnectionManager.__getConnection(__ConnectionManager.java:317) > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: at > > ftp.FtpVFS.getConnection(__FtpVFS.java:511) > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: at > > ftp.FtpVFS._listFiles(FtpVFS.__java:222) > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: at > > > > org.gjt.sp.jedit.browser.__ListDirectoryBrowserTask._run(__ListDirectoryBrowserTask.java:__74) > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: at > > org.gjt.sp.util.Task.run(Task.__java:64) > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: at > > > > java.util.concurrent.__ThreadPoolExecutor$Worker.__runTask(ThreadPoolExecutor.__java:886) > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: at > > > > java.util.concurrent.__ThreadPoolExecutor$Worker.run(__ThreadPoolExecutor.java:908) > > 10:23:14 AM [jEdit Worker #2] [error] > ListDirectoryBrowserTask: at > > java.lang.Thread.run(Thread.__java:680) > > 10:23:14 AM [jEdit Worker #2] [error] > ErrorListDialog$ErrorEntry: > > sftp://USERNAME@MYHOSTNAME:22/__u0/USERNAME: > > 10:23:14 AM [jEdit Worker #2] [error] > ErrorListDialog$ErrorEntry: Cannot > > list directory: java.io.IOException: > com.jcraft.jsch.JSchException: Auth > > cancel > > 10:23:14 AM [jEdit Worker #2] [debug] > ConnectionManager: > > releaseConnection(null) > > > > > > On Sun, Nov 18, 2012 at 9:46 PM, Alan Ezust > <ala...@gm... <mailto:ala...@gm...> > <mailto:ala...@gm... <mailto:ala...@gm...>>> > wrote: > >> > >> I just released FTP 1.0.1 which fixed the issue > I was > having. I am not > >> 100% sure if it is the same > >> as yours. What platform is this? Can you use > ssh-add or > other ssh clients > >> with the same key? > >> > >> > >> > >> On Sun, Nov 18, 2012 at 2:04 PM, Brad Smith > <use...@gm... > <mailto:use...@gm...> > <mailto:usernamenumber@gmail.__com > <mailto:use...@gm...>>> > > >> wrote: > >>> > >>> jEdit 5.0pre1, FTP plugin v1.0.0. I looked > around on the > site and wiki > >>> but couldn't find anything about an svn repo > where I might > get the latest > >>> plugin, but if you point me to docs I'll > upgrade and see if > it helps. > >>> > >>> Thanks! > >>> --Brad > >>> > >>> > >>> On Sun, Nov 18, 2012 at 1:08 PM, Alan Ezust > <ala...@gm... <mailto:ala...@gm...> > <mailto:ala...@gm... <mailto:ala...@gm...>>> > wrote: > >>>> > >>>> Using FTP plugin 1.0 and jEdit 5.1pre1, I can > reproduce > your issue. > >>>> If I update to the version in SVN, FTP plugin > 1.0.1, it > seems to have > >>>> been fixed already but nobody released it yet. > >>>> > >>>> What versions of jedit and FTP plugin are you > using? > >>>> > >>>> > >>>> On Fri, Nov 16, 2012 at 10:32 AM, Brad Smith > <use...@gm... > <mailto:use...@gm...> > <mailto:usernamenumber@gmail.__com > <mailto:use...@gm...>>> > > >>>> wrote: > >>>>> > >>>>> Hi Folks, > >>>>> > >>>>> I recently updated the key I use to access > one of my > servers, and ever > >>>>> since jEdit's FTP plugin has failed to > unlock the key; it > just keeps > >>>>> prompting me to enter my passphrase as > though I've been > entering the wrong > >>>>> one, though I'm certain I'm not. I have this > nagging > sense that I've > >>>>> encountered and resolved this issue before, > but for the > life of me I can't > >>>>> remember how. :( > >>>>> > >>>>> Here's a list of what I've tried so far: > >>>>> > >>>>> - Restarted jEdit > >>>>> > >>>>> - Told the plugin to clear all caches and > passwords, and > specified the > >>>>> connection details from scratch (as opposed > to using my > old bookmark) > >>>>> > >>>>> - Verified repeatedly that the same > key/passphrase works > for this > >>>>> username/server from the command line > >>>>> > >>>>> - Confirmed that servers that use other keys > still work > with the FTP > >>>>> plugin > >>>>> > >>>>> - Checked the Activity Log (nothing useful > that I can see) > >>>>> > >>>>> - Just to check, removed the passphrase from > my key. > JEdit continues to > >>>>> prompt for, and then reject, my passphrase! > >>>>> > >>>>> - ...BUT, according to the atimes on my > keyfiles, jEdit > is accessing > >>>>> the correct key, and not the old one (none > of the old > passphrases work > >>>>> anyway). > >>>>> > >>>>> > >>>>> So... at this point I'm stuck. I would > *really* like to > stop using vim > >>>>> over a slow ssh connection though, so any > help would be > greatly appreciated! > >>>>> > >>>>> Thanks! > >>>>> --Brad > >>>>> > >>>>> > >>>>> > > ------------------------------__------------------------------__------------------ > >>>>> Monitor your physical, virtual and cloud > infrastructure > from a single > >>>>> web console. Get in-depth insight into apps, > servers, > databases, > >>>>> vmware, > >>>>> SAP, cloud infrastructure, etc. Download > 30-day Free Trial. > >>>>> Pricing starts from $795 for 25 servers or > applications! > >>>>> http://p.sf.net/sfu/zoho___dev2dev_nov > <http://p.sf.net/sfu/zoho_dev2dev_nov> > >>>>> -- > >>>>> > ------------------------------__----------------- > >>>>> jEdit Users' List > >>>>> jEd...@li...urceforge.__net > <mailto:jEd...@li...> > <mailto:jEdit-users@lists.__sourceforge.net > <mailto:jEd...@li...>> > > >>>>> > https://lists.sourceforge.net/__lists/listinfo/jedit-users > <https://lists.sourceforge.net/lists/listinfo/jedit-users> > >>>>> > >>>> > >>> > >> > > > > > > > > ------------------------------__------------------------------__------------------ > > Monitor your physical, virtual and cloud > infrastructure from > a single > > web console. Get in-depth insight into apps, > servers, > databases, vmware, > > SAP, cloud infrastructure, etc. Download 30-day > Free Trial. > > Pricing starts from $795 for 25 servers or > applications! > > http://p.sf.net/sfu/zoho___dev2dev_nov > <http://p.sf.net/sfu/zoho_dev2dev_nov> > > -- > > ------------------------------__----------------- > > jEdit Users' List > > jEd...@li...urceforge.__net > <mailto:jEd...@li...> > <mailto:jEdit-users@lists.__sourceforge.net > <mailto:jEd...@li...>> > > > > https://lists.sourceforge.net/__lists/listinfo/jedit-users > <https://lists.sourceforge.net/lists/listinfo/jedit-users> > > > > > ------------------------------__------------------------------__------------------ > Monitor your physical, virtual and cloud > infrastructure from a > single > web console. Get in-depth insight into apps, > servers, databases, > vmware, > SAP, cloud infrastructure, etc. Download 30-day > Free Trial. > Pricing starts from $795 for 25 servers or > applications! > http://p.sf.net/sfu/zoho___dev2dev_nov > <http://p.sf.net/sfu/zoho_dev2dev_nov> > -- > ------------------------------__----------------- > jEdit Users' List > jEd...@li...urceforge.__net > <mailto:jEd...@li...> > <mailto:jEdit-users@lists.__sourceforge.net > <mailto:jEd...@li...>> > > https://lists.sourceforge.net/__lists/listinfo/jedit-users > <https://lists.sourceforge.net/lists/listinfo/jedit-users> > > > > > ------------------------------__------------------------------__------------------ > Monitor your physical, virtual and cloud infrastructure > from a single > web console. Get in-depth insight into apps, servers, > databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho___dev2dev_nov > <http://p.sf.net/sfu/zoho_dev2dev_nov> > -- > ------------------------------__----------------- > jEdit Users' List > jEd...@li...urceforge.__net > <mailto:jEd...@li...> > <mailto:jEdit-users@lists.__sourceforge.net > <mailto:jEd...@li...>> > > https://lists.sourceforge.net/__lists/listinfo/jedit-users > <https://lists.sourceforge.net/lists/listinfo/jedit-users> > > > > > ------------------------------__------------------------------__------------------ > Monitor your physical, virtual and cloud infrastructure from > a single > web console. Get in-depth insight into apps, servers, > databases, vmware, > SAP, cloud infrastructure, etc. Download 30-day Free Trial. > Pricing starts from $795 for 25 servers or applications! > http://p.sf.net/sfu/zoho___dev2dev_nov > <http://p.sf.net/sfu/zoho_dev2dev_nov> > > > > > |