Thread: [Boa Constr] SSHExplorer
Status: Beta
Brought to you by:
riaan
From: Yuppie <sc...@we...> - 2002-10-24 17:28:41
|
Hi! Does anyone use the SSHExplorer? My environment: - Boa 0.1.3 a - Windows 98 SE - OpenSSH on Windows v3.4-2 My experiments: - I managed to browse the remote filesystem o using the absolute root path ("/home/user", not "~") o changing 'ls %s -la' to 'ls -la %s' in the source - I tried to open files from remote filesystem o copyToFS and copyFromFS seem to use pscp, not my scp My questions: - Is pscp PuTTY-scp? Does SSHExplorer work if I install this? - So SSHExplorer doesn't work on unix platforms? - Why do I need scp_pass? scp does key authorization like ssh. TIA, Yuppie |
From: Riaan B. <riaan@e.co.za> - 2002-10-27 08:03:09
|
Hi Yuppie, Yuppie wrote: > > Hi! > > Does anyone use the SSHExplorer? Me! I use it to browse my SourceForge shell account and copy files to/from it. My one and only test case :) > My environment: > > - Boa 0.1.3 a > - Windows 98 SE > - OpenSSH on Windows v3.4-2 > > My experiments: > > - I managed to browse the remote filesystem > o using the absolute root path ("/home/user", not "~") I assume you mean you changed the property 'root' of the SSH connection. You *should* change this (as you did) to wherever you need. It's a property in the Inspector after all! ~ still sounds like a valid default that has a better chance of working that any other default value. > o changing 'ls %s -la' to 'ls -la %s' in the source It worked for me, but yes, 'ls -la %s' is better (at least that's the way I usually list files ;) > - I tried to open files from remote filesystem > o copyToFS and copyFromFS seem to use pscp, not my scp > > My questions: > > - Is pscp PuTTY-scp? Does SSHExplorer work if I install this? Yes, it's putty scp. The only scp I could get to work (see below). > - So SSHExplorer doesn't work on unix platforms? The browsing part should work. The copying part won't (as it is currently). As these tools are actually unix tools, there is no reason for it not to work there if you change the strings in the buildSCPStrs method. I've actually forgotten about this issue (pscp) thanks! In my defence, this is the first feedback I've received about SSH support. Under 2.3.3.1/wxGTK Boa's SSH support is currently broken on unix anyway due to different issue (Problem with wxProcess and it's streams) so you won't even get this far. > - Why do I need scp_pass? scp does key authorization like ssh. Mine doesn't, not exactly the same. The biggest issue (if I recall correctly) was that scp always prompts for a password/passphrase and would not use the stored key without prompting. When running it from another process, It is impossible to 'feed' scp a password/passphrase on stdin as password input is handled handled differently by the shell than normal input. (With a blank passphrase and the identity file ssh does not prompt) That's why I chose pscp that accepts a password on the command line. (later, the above left in for historical purposes ;) After testing scp again it seems to be working now! Granted I'm not on the same machine I was when I wrote SSHExplorer, but I have no idea what has changed in the meanwhile. The new problem I now have is that scp does not accept windows paths. (Seems to be a quick and dirty port) e.g. scp <remotepath> text.txt copies fine, but scp <remotepath> c:\text.txt gives an error :/ One way to work around this would be to change the current directory to the localpath directory before running the command. (later again) Ok I installed the OpenSSH that you are using (I think). It was unable to use my current public/private keys so I uninstalled it. I'm *not* going thru that whole new key process now. (Also it's cygwin based and I really prefer the simple scp.exe/ssh.exe setup I had) I'll implement the current directory hack, that should work for both of us and also on Linux. For you this change should be sufficient: def buildSCPStrs(self, source, dest): return 'scp %s %s'%(source, dest), 'scp %s %s'%(source, dest) Cheers, Riaan. |
From: Yuppie <sc...@we...> - 2002-10-27 15:26:27
|
Hi Riaan! Many thanks for your reply! > Me! I use it to browse my SourceForge shell account and copy files > to/from it. My one and only test case :) Interested in some more test results? Today I took a closer look at SSH. I tested on 3 accounts: user@irixhost: irix, OpenSSH user@linuxhost: linux, OpenSSH user@windowshost: windows, OpenSSH/cygwin, boa > >My experiments: > > > >- I managed to browse the remote filesystem > > o using the absolute root path ("/home/user", not "~") > > > I assume you mean you changed the property 'root' of the SSH > connection. Right. > You *should* change this (as you did) to wherever you need. > It's a property in the Inspector after all! > ~ still sounds like a valid default that has a better chance > of working that any other default value. Yes and no. The '~'-problem: ================ ~ is expanded on the local machine. If home path is not the same on local and remote machine, SSHExplorer fails. [user@irixhost]: echo $home /home/u/user [user@linuxhost]: echo $home /home/user [user@windowshost]: echo %home% C:\myhome [user@irixhost]: ssh -l <user> <linuxhost> ls -la ~ ls: /home/u/user: not found [user@windowshost]: ssh -l <user> <linuxhost> ls -la ~ ls: /myhome: not found [user@irixhost]: ssh -l <user> <linuxhost> ls -la \~ works [user@windowshost]: ssh -l <user> <linuxhost> ls -la \~ ls: ~: not found [user@irixhost]: ssh -l <user> <linuxhost> ls -la '~' works [user@windowshost]: ssh -l <user> <linuxhost> ls -la '~' works [user@windowshost]: ssh -l <user> <linuxhost> ls -la '~'/folder works [user@windowshost]: ssh -l <user> <linuxhost> 'ls -la ~/folder' works Quoting seems to be the solution, at least on cygwin and unix. Changed the property 'root' from "~" to "'~'" and browsing works fine for me. > >- I tried to open files from remote filesystem > > o copyToFS and copyFromFS seem to use pscp, not my scp > > > >My questions: > > > >- Is pscp PuTTY-scp? Does SSHExplorer work if I install this? > > > Yes, it's putty scp. The only scp I could get to work (see below). Did not install this so far. > After testing scp again it seems to be working now! > Granted I'm not on the same machine I was when I wrote SSHExplorer, > but I have no idea what has changed in the meanwhile. > > The new problem I now have is that scp does not accept windows > paths. (Seems to be a quick and dirty port) > > e.g. > scp text.txt > > copies fine, but > > scp c:\text.txt > > gives an error :/ > > One way to work around this would be to change the current directory > to the localpath directory before running the command. Same Problem with OpenSSH. > I'll implement the current directory hack, that should work for both > of us and also on Linux. +1 > For you this change should be sufficient: > > def buildSCPStrs(self, source, dest): > return 'scp %s %s'%(source, dest), 'scp %s %s'%(source, dest) Well. Actually that's the last thing I tried before writing to the mailinglist. The ':'-problem: ================ scp syntax uses ':' to seperate <host> from <file>. c:\filename is interpreted as host = "c" and file = "\filename". [user@windowshost]: scp <user>@<linuxhost>:file c:\folder ssh: c: no address associated with hostname. [user@windowshost]: scp <user>@<linuxhost>:file /folder works [user@windowshost]: scp <user>@<linuxhost>:file /cygdrive/c/folder works Any hints where to change the local path? TIA, Yuppie |
From: Riaan B. <riaan@e.co.za> - 2002-10-28 04:32:59
|
Hi Yuppie, Yuppie wrote: > > Hi Riaan! > > Many thanks for your reply! No problem, glad this might be useful to more than 1 person :) > The '~'-problem: > ================ Interesting that unquoted paths are locally expanded, I would never have guessed, but I suppose it makes sense. > [user@windowshost]: ssh -l <user> <linuxhost> 'ls -la ~/folder' > works This is the one I'm going to use, thanks for the testing! (after testing) Damn! This does not work for the source forge server. This variation does work (I'm now using it): [user@windowshost]: ssh -l <user> <linuxhost> ls -la '~/folder' I've added quoting to all SSH commands that uses paths. > > I'll implement the current directory hack, that should work for both > > of us and also on Linux. > > +1 OK. > > > For you this change should be sufficient: > > > > def buildSCPStrs(self, source, dest): > > return 'scp %s %s'%(source, dest), 'scp %s %s'%(source, dest) > > Well. Actually that's the last thing I tried before writing to the > mailinglist. My comment above was under the assumption that your OpenSSH accepted windows paths. If it doesn't, then agreed, more than just the above changes are needed. > > The ':'-problem: > ================ > scp syntax uses ':' to seperate <host> from <file>. c:\filename is > interpreted as host = "c" and file = "\filename". Understood, although the @ could be used to distinguish between local and remote parts. pscp handles local windows paths correctly. > Any hints where to change the local path? When I implemement the proposed "current directory hack" there will be no more local paths only a filename ;) ... Ok, all discussed changes are implemented, tested and checked into CVS. Please also test and drop me a note if it doesn't work as expected. I have *many* other local changes to other parts of Boa, but have not had time for a mega checkin, hope to get to it soon! Thanks for the feedback, Riaan. |
From: Yuppie <sc...@we...> - 2002-10-28 15:05:24
|
Hi Riaan! > Ok, all discussed changes are implemented, tested and checked into CVS. Great! > Please also test and drop me a note if it doesn't work as expected. Much better now. The discussed problems are solved! But I found some other bugs: 1.) Deleting folders doesn't work with 'rm'. What about using 'rm -r' or 'rm -rf'? 2.) Opening files doesn't work: Explorers.ExplorerNodes.TransportError: Catalog transport could not be found: label~ || folder/test.txt 3.) scp from one remote host to another doesn't work. 4.) The irix host returns folder names with trailing slash. The explorer shows "./", "../", "folder/" and the paths contain "//". I don't know how many unix platforms do this, but filtering out trailing slashs would be nice. Connecting and authenticating seems to be an expensive process: About 30 seconds on my accounts. So browsing doesn't make much fun. Whould it be possible to keep the ssh connections alive? Perhaps in a future release? > I have *many* other local changes to other parts of Boa, but have > not had time for a mega checkin, hope to get to it soon! Looking forward to it! Cheers, Yuppie |
From: Riaan B. <riaan@e.co.za> - 2002-10-30 09:26:16
|
Hi Yuppie, Yuppie wrote: > > Please also test and drop me a note if it doesn't work as expected. > > Much better now. The discussed problems are solved! > > But I found some other bugs: > > 1.) Deleting folders doesn't work with 'rm'. What about using 'rm -r' or > 'rm -rf'? Added -rf, thanks. > > 2.) Opening files doesn't work: > Explorers.ExplorerNodes.TransportError: Catalog transport could not be > found: label~ || folder/test.txt Opening files works for me. From the error message it was trying to open folder/test.txt from a SSHConnection named "label~". I doubt you actually had a SSHConnection named like that so the URL splitting logic is somehow not handling your path. Please mail me (directly) your connection info (from Explorer.msw.cfg). Remove sensitive info. Also note something I failed to mention before; you may now safely remove the scp_pass property from any SSHConnection definition in Explorer.msw.cfg. As a workaround for now, use A simple alpha-numeric connection name and avoid ~ (I don't know why it would break anything, but "label~" seems to indicate it as a possible culprit) > > 3.) scp from one remote host to another doesn't work. You mean when you copy/paste from one SSHConnection to another? That's not supported no. scp does not seem to support copying from one remote server to another. If you are interested: SSHExplorer.SSHExpClipboard.clipPaste_SSHExpClipboard must: * Check if the pasted node is from a different SSHConnection * SCP it to a local temp file * SCP the temp file to the second remote server. I've no plans to do this soon. > 4.) The irix host returns folder names with trailing slash. The explorer > shows "./", "../", "folder/" and the paths contain "//". I don't know > how many unix platforms do this, but filtering out trailing slashs would > be nice. I've added this. (untested, please test) Both fixes checked into CVS. > Connecting and authenticating seems to be an expensive process: About 30 > seconds on my accounts. So browsing doesn't make much fun. Whould it be > possible to keep the ssh connections alive? Perhaps in a future release? Can't see how to do that without a rewrite and much pain. (With Rasjid's PySSH, maybe not too much pain :) Patches welcome ;) Cheers, Riaan. |
From: Christian T. <ti...@ti...> - 2002-11-19 15:26:24
|
Riaan Booysen wrote: ...big snip... > Ok I installed the OpenSSH that you are using (I think). > > It was unable to use my current public/private keys so I uninstalled it. > I'm *not* going thru that whole new key process now. > (Also it's cygwin based and I really prefer the simple > scp.exe/ssh.exe setup I had) Well, my experience with OpenSSH under cygwin is very good. One fine thing is that it supports ssh-agent. This will work with any process, given that you start it from a cygwin shell. For instance, I use it with WinCVS. Starting a cygwin shell, I run ssh-agent bash ssh-add (type your phrase) and then I call the WinCVS executable from that shell. Works fine, authentication works behind the scenes like a charm. I haven't seen a package yet that does this for plain windows, alone. cheers - chris -- Christian Tismer :^) <mailto:ti...@ti...> Mission Impossible 5oftware : Have a break! Take a ride on Python's Johannes-Niemeyer-Weg 9a : *Starship* http://starship.python.net/ 14109 Berlin : PGP key -> http://wwwkeys.pgp.net/ work +49 30 89 09 53 34 home +49 30 802 86 56 pager +49 173 24 18 776 PGP 0x57F3BF04 9064 F4E1 D754 C2FF 1619 305B C09C 5A3B 57F3 BF04 whom do you want to sponsor today? http://www.stackless.com/ |
From: Rasjid W. <ra...@op...> - 2002-10-29 09:45:35
|
On Tue, 29 Oct 2002 2:01 am, Yuppie wrote: <snip> > Connecting and authenticating seems to be an expensive process: About 30 > seconds on my accounts. So browsing doesn't make much fun. Whould it be > possible to keep the ssh connections alive? Perhaps in a future release? > Perhaps Riaan could have a look at PySSH (http://sourceforge.net/projects/pyssh). This makes it relatively easy to send a number of commands over a single SSH session, and view (from within Python) the output. It is still Beta, but should work well with ssh on Linux and on Windows using Cygwin. It does support Putty on Windows, but that is still Alpha, although its main shortcoming is in forcing the SSH session to close. I am the current maintainer (took over in August this year), and if there is interest and feedback I'd be fairly likely to put in the work to get the Putty integration up to the desired level. OTOH, in my experience ssh under cygwin is more powerful than putty for command line usage, and in this case pyssh should work well. By the way, Boa rocks big time. I used it while writing pyssh 0.2. Cheers, Rasjid. |
From: Riaan B. <riaan@e.co.za> - 2002-10-30 09:26:11
|
Hi Rasjid, Rasjid Wilcox wrote: > > On Tue, 29 Oct 2002 2:01 am, Yuppie wrote: > <snip> > > Connecting and authenticating seems to be an expensive process: About 30 > > seconds on my accounts. So browsing doesn't make much fun. Whould it be > > possible to keep the ssh connections alive? Perhaps in a future release? > > > > Perhaps Riaan could have a look at PySSH > (http://sourceforge.net/projects/pyssh). This makes it relatively easy to > send a number of commands over a single SSH session, and view (from within > Python) the output. Cool! > It is still Beta, but should work well with ssh on Linux and on Windows using > Cygwin. It does support Putty on Windows, but that is still Alpha, although > its main shortcoming is in forcing the SSH session to close. At the end of this thread Boa no longer supported putty, so that doesn't bother me :) > I am the current maintainer (took over in August this year), and if there is > interest and feedback I'd be fairly likely to put in the work to get the > Putty integration up to the desired level. OTOH, in my experience ssh under > cygwin is more powerful than putty for command line usage, and in this case > pyssh should work well. Personally I don't want to tie Boa to cygwin. Can't your library also use a single ssh.exe/scp.exe setup. (I can mail these exes to you if you don't have them) I will put PySSH integration on my todo list, but be warned the list is huge so I won't get to it anytime soon. I strongly urge you to attempt the integration! Make a copy of Explorers/SSHExplorer.py and call it Explorers/PySSHExplorer.py. Keep all the class names the same. In Explorer.*.cfg, in the installedtransports list under the [explorer] section, just change 'Exporers.SSHExplorer' to 'Exporers.PySSHExplorer'. Now the PySSHExplorer will be a drop-in replacement for SSH. I assume for your purposes the current connection properties will be sufficient. You don't have to know about the rest of the Boa code base to implement this, just reimplement the current interface. One small complication is that SSH support (like most others) is currently a stateless transport. Only the FTP transport is statefull. You'll have to use tricks similar to FTPExplorer to automatically do the connection when necessary. > By the way, Boa rocks big time. I used it while writing pyssh 0.2. Thanks, that's great to hear! > > Cheers, > > Rasjid. > Cheers, Riaan. |
From: Rasjid W. <ra...@op...> - 2003-01-05 01:23:26
|
A very very belated response to this... On Wed, 30 Oct 2002 8:30 pm, Riaan Booysen wrote: > Personally I don't want to tie Boa to cygwin. Can't your library also > use a single ssh.exe/scp.exe setup. (I can mail these exes to you if > you don't have them) I'd rather know the source of these non-putty, non-cygwin executables, as the putty ones do not work well with PySSH, and I'd like to see if these do. Cheers, Rasjid. -- Rasjid Wilcox Canberra, Australia (UTC +10 hrs) http://www.openminddev.net |
From: Riaan B. <ri...@tb...> - 2003-01-05 02:44:19
|
Hi Rasjid, > A very very belated response to this... No problem, glad you did in the end. > On Wed, 30 Oct 2002 8:30 pm, Riaan Booysen wrote: > > Personally I don't want to tie Boa to cygwin. Can't your library also > > use a single ssh.exe/scp.exe setup. (I can mail these exes to you if > > you don't have them) > > I'd rather know the source of these non-putty, non-cygwin > executables, as the > putty ones do not work well with PySSH, and I'd like to see if these do. Not exactly sure about the sources for the exes, inside them is a BSD copyright notice. I suspect it's just the OpenSSH sources (of a while back) compiled with MinGW. I've mailed you the exes I have. Cheers, Riaan. |
From: Rasjid W. <ra...@op...> - 2003-02-04 12:44:32
|
On Sun, 5 Jan 2003 1:46 pm, Riaan Booysen wrote: > Hi Rasjid, > > > A very very belated response to this... > > No problem, glad you did in the end. > > > On Wed, 30 Oct 2002 8:30 pm, Riaan Booysen wrote: > > > Personally I don't want to tie Boa to cygwin. Can't your library also > > > use a single ssh.exe/scp.exe setup. (I can mail these exes to you if > > > you don't have them) > > > > I'd rather know the source of these non-putty, non-cygwin > > executables, as the > > putty ones do not work well with PySSH, and I'd like to see if these do. > > Not exactly sure about the sources for the exes, inside them is a BSD > copyright notice. > > I suspect it's just the OpenSSH sources (of a while back) compiled with > MinGW. After some searching, I've found what I think is the sources for the executables (or rather, patches against the original sources). As for the actual sources, I'm hoping that a linux source rpm of the same version will have the original sources intact. All up, it appears that the binaries are openssh 1.2.14. The only instructions I could find on compiling uses VC++6.0 through a Cygwin shell, not MinGW. Anyway, I'm much happier now that I know where these come from and roughtly what they are. I'd be happier still if I could find such a thing for a more recent version of ssh. Cheers, Rasjid. -- Rasjid Wilcox Canberra, Australia (UTC +10 hrs) http://www.openminddev.net |