On Tue, 30 Aug 2011, Charles Campbell wrote:

guyht wrote:
I am experiencing a bug where Explorer does not honour a port number when editing files over SCP.

To reproduce

Open a directory over scp (gvim scp://user@domain:1234//home/user/)

Files and directories listed as expected...

Open a file

vim ignores the port number and attempts to edit the file at
scp://user@domain:22//home/user/file.txt


Hello,

The machines I use to test netrw+scp use port#22, so what I did was

 scp://user@domain:22//home/user/somefile

This worked, giving me the contents of the file.

 scp://user@domain:32//home/user/somefile

This does not work. The "22" was extracted properly by NetrwMethod() from the first example I gave above. So, I cannot seem to duplicate your problem and will need your help. Please read :help netrw-debug to generate a debugging trace when you attempt to open a file via the non-default port number.

It appears we both missed something, as I also thought this was a "worksforme".

The problem is not with opening an individual file. It only occurs when opening a file from the directory listing.

If I open:

scp://bhask...@example.com:443//home/bhaskell/

The listing is appropriately routed via port 443 (which I use as a workaround for firewalls that block SSH port 22, but not HTTPS port 443).

But, if I hit Enter on .vimrc in that directory, it opens:

scp://bhask...@example.com//home/bhaskell/.vimrc

(falling back to the default port, not port 443)

I'm using Netrw v141n

If you're in control of any of your test machines, you can simply add a second 'Port' line to /etc/ssh/sshd_config and restart sshd.

E.g. to listen on both 22 and 443:
Port 22
Port 443

--
Best,
Ben

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui