scp bug in gvim?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

scp bug in gvim?

Neil Watson
I've noticed that the scp feature (scp://[hidden email]//path/to/file)
does not work with gvim, only with vim.  Vim prompts for a password to
login.  Gvim returns a blank document.  On the server side it appears
that gvim authenticates improperly.  Key pair athentication works as expected.

Server log ssh session:
Mar 22 09:18:25 ettin sshd(pam_unix)[17578]: check pass; user unknown
Mar 22 09:18:25 ettin sshd(pam_unix)[17578]: authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=205.150.90.103
Mar 22 09:18:27 ettin sshd[17569]: error: PAM: Authentication failure for illegal user XXXXXX from 205.150.90.103
Mar 22 09:18:27 ettin sshd[17569]: Failed keyboard-interactive/pam for invalid user XXXXXX from 205.150.90.103 port 55414 ssh2

I can reproduce this on with:
VIM - Vi IMproved 6.3 (2004 June 7, compiled May 27 2005 09:15:56)
Included patches: 1-74
Compiled by nwatson@valetta
Normal version with GTK2 GUI.  Features included (+) or not (-):
-arabic +autocmd +balloon_eval +browse +builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv -cscope +dialog_con_gui +diff +digraphs +dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path +find_in_path +folding -footer
+fork() -gettext -hangul_input +iconv +insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession
+modify_fname +mouse +mouseshape -mouse_dec +mouse_gpm -mouse_jsbterm -mouse_netterm +mouse_xterm +multi_byte +multi_lang +netbeans_intg -osfiletype
+path_extra -perl +postscript +printer -python +quickfix -rightleft -ruby +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
 +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
 +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save
   system vimrc file: "$VIM/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "$VIM/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/
usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include     -
march=athlon -O3 -pipe
Linking: gcc   -L/usr/local/lib -o vim   -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.
0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0   -lXt -lncurses -lacl -lgpm

and

VIM - Vi IMproved 6.3 (2004 June 7, compiled Apr  7 2005 10:09:47)
Included patches: 1-68
Compiled by nwatson@valetta
Huge version with GTK2-GNOME GUI.  Features included (+) or not (-):
+arabic +autocmd +balloon_eval +browse ++builtin_terms +byte_offset +cindent +clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
+cryptv -cscope +dialog_con_gui +diff +digraphs +dnd -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path +find_in_path +folding -footer
+fork() +gettext -hangul_input +iconv +insert_expand +jumplist +keymap +langmap +libcall +linebreak +lispindent +listcmds +localmap +menu +mksession
+modify_fname +mouse +mouseshape +mouse_dec +mouse_gpm -mouse_jsbterm +mouse_netterm +mouse_xterm +multi_byte +multi_lang +netbeans_intg -osfiletype
+path_extra +perl +postscript +printer +python +quickfix +rightleft -ruby +scrollbind +signs +smartindent -sniff +statusline -sun_workshop +syntax +tag_binary
 +tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title +toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
 +vreplace +wildignore +wildmenu +windows +writebackup +X11 -xfontset +xim +xsmp_interact +xterm_clipboard -xterm_save
   system vimrc file: "/etc/vim/vimrc"
     user vimrc file: "$HOME/.vimrc"
      user exrc file: "$HOME/.exrc"
  system gvimrc file: "/etc/vim/gvimrc"
    user gvimrc file: "$HOME/.gvimrc"
    system menu file: "$VIMRUNTIME/menu.vim"
  fall-back for $VIM: "/usr/share/vim"
Compilation: i686-pc-linux-gnu-gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK  -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/gtk-2.0 -I/usr/lib/g
tk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib
-2.0/include   -DORBIT2=1 -pthread -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -I/usr/include/libgnomeui-2.0 -I/usr/include/libgnome-2.0 -I/usr/include/libgnomec
anvas-2.0 -I/usr/include/gtk-2.0 -I/usr/include/libart-2.0 -I/usr/include/gconf/2 -I/usr/include/libbonoboui-2.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/in
clude -I/usr/include/orbit-2.0 -I/usr/include/libbonobo-2.0 -I/usr/include/gnome-vfs-2.0 -I/usr/lib/gnome-vfs-2.0/include -I/usr/include/bonobo-activation-2.0
-I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/freetype2/config -I/usr/include/libxml2
-march=athlon -O2 -pipe   -pipe -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64  -I/usr/lib/perl5/5.8.5/i686-linux/CORE  -I/usr/include/python2.3 -pthread
Linking: i686-pc-linux-gnu-gcc   -rdynamic   -L/usr/local/lib -o gvim   -Wl,--export-dynamic -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-
1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lglib-2.0     -lgnomeui-2 -lbonoboui-2 -lxml2 -lz -lgnomecanvas-2 -lgnome-2 -lpopt -lart_lgpl_2 -lpan
goft2-1.0 -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgnomevfs-2 -lbonobo-2 -lgconf-2 -lbono
bo-activation -lORBit-2 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0   -lXt -lncurses -lgpm -rdynamic  -L/usr/local/lib /usr/lib/perl5/5.8.5/i686-linux/auto/DynaLoad
er/DynaLoader.a -L/usr/lib/perl5/5.8.5/i686-linux/CORE -lperl -lutil -lc -L/usr/lib/python2.3/config -lpython2.3 -lutil -lm -Xlinker -export-dynamic


--
Neil Watson               | Gentoo Linux
Network Administrator     | Uptime 7 days
http://watson-wilson.ca   | 2.6.11.4 AMD Athlon(tm) MP 2000+ x 2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: scp bug in gvim?

Bram Moolenaar

Neil Watson wrote:

> I've noticed that the scp feature (scp://[hidden email]//path/to/file)
> does not work with gvim, only with vim.  Vim prompts for a password to
> login.  Gvim returns a blank document.  On the server side it appears
> that gvim authenticates improperly.  Key pair athentication works as
> expected.

The problem probably is that ssh tries to read a password from /dev/tty.
When running gvim that doesn't work, there is no terminal.

Note that it's not Vim that prompts for a password, ssh does.  You can
pass the password to ssh, but it might show up somewhere, it's not very
security.

A suggestion in the netrw help is to read this:

        http://hacks.oreilly.com/pub/h/66

Perhaps ssh-agent can help you.

--
You can test a person's importance in the organization by asking how much RAM
his computer has.  Anybody who knows the answer to that question is not a
decision-maker.
                                (Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- [hidden email] -- http://www.Moolenaar.net   \\\
///        Sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\              Project leader for A-A-P -- http://www.A-A-P.org        ///
 \\\     Buy LOTR 3 and help AIDS victims -- http://ICCF.nl/lotr.html   ///
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: scp bug in gvim?

Neil Watson
On Fri, May 27, 2005 at 10:28:24PM +0200, Bram Moolenaar wrote:
>The problem probably is that ssh tries to read a password from /dev/tty.
>When running gvim that doesn't work, there is no terminal.

That's dissapointing.  Will this problem still exist in Vim7.  Yes, I do
use key pairs on many servers but, some I access so infrequently that I
have not bothered.

--
Neil Watson               | Gentoo Linux
Network Administrator     | Uptime  08:12:57 up 15:56,  2 users,  load average: 0.01, 0.02, 0.00
http://watson-wilson.ca   | 2.6.11.4 AMD Athlon(tm) MP 2000+ x 2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: scp bug in gvim?

Walter Wilson
I use vim 6.2 with winscp 3.7.4 successfully.
I never thought I would say it, but score 1 for widoze.

Walter Wilson
-----Original Message-----
From: Neil Watson [mailto:[hidden email]]
Sent: Saturday, May 28, 2005 5:15 AM
To: [hidden email]
Subject: Re: scp bug in gvim?

On Fri, May 27, 2005 at 10:28:24PM +0200, Bram Moolenaar wrote:
>The problem probably is that ssh tries to read a password from /dev/tty.
>When running gvim that doesn't work, there is no terminal.

That's dissapointing.  Will this problem still exist in Vim7.  Yes, I do
use key pairs on many servers but, some I access so infrequently that I
have not bothered.

--
Neil Watson               | Gentoo Linux
Network Administrator     | Uptime  08:12:57 up 15:56,  2 users,  load average: 0.01, 0.02, 0.00
http://watson-wilson.ca   | 2.6.11.4 AMD Athlon(tm) MP 2000+ x 2

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: scp bug in gvim?

Charles E Campbell Jr
In reply to this post by Neil Watson
Quoting Neil Watson <[hidden email]>:

> I've noticed that the scp feature (scp://[hidden email]//path/to/file)
> does not work with gvim, only with vim.  Vim prompts for a password to
> login.  Gvim returns a blank document.  On the server side it appears
> that gvim authenticates improperly.  Key pair athentication works as
> expected.

Hello!

I cannot duplicate this with RedHat 8.0 Linux.  The attempt to do the
scp there results in a requester issued by ssh for the password, and
netrw+gvim+scp proceed to obtain/edit the file.

As Bram mentioned, the netrw-list-hack suggestion may help you.

Regards,
Chip Campbell

Loading...