hello, I have the problem with sftp, I can't read files and dirs from huawei switches. I see: mm:/home/milon# sftp 10.1.1.30:vrpcfg.cfg . Connecting to 10.1.1.30... root at 10.1.1.30's password: Couldn't stat remote file: Operation unsupported File "flash:/flash:/vrpcfg.cfg" not found. Received disconnect from 10.1.1.30: 2: The connection is closed by SSH Server Current FSM is SSH_Main_Disconnect Or interactive session: sftp> ls Couldn't stat remote file: Operation unsupported Can't ls: "flash:/" not found sftp> cd / Couldn't stat remote file: Operation unsupported sftp> get vrpcfg.cfg Couldn't stat remote file: Operation unsupported File "flash:/vrpcfg.cfg" not found. Hovewer mkdir, rmdir, put and rm operations are working. Winscp program is working too. Any suggestions ? Or workaround ? openssh version 4.6p1, switch huawei quidway 5600; reading file of course exists Thanks for any reply. (Please cc) regards, -- Milan Kocian
On Sun, Nov 04, 2007 at 01:39:29PM +0100, Milan Kocian wrote:> Or interactive session: > > sftp> ls > Couldn't stat remote file: Operation unsupported > Can't ls: "flash:/" not foundDoes the pwd command work? //Peter
(resend, my previous reply was from a non-subscribed address) On Nov 4, 2007 4:39 AM, Milan Kocian <milon at wq.cz> wrote:> I have the problem with sftp, I can't read files and dirs from huawei > switches. I see: > > mm:/home/milon# sftp 10.1.1.30:vrpcfg.cfg . > Connecting to 10.1.1.30... > root at 10.1.1.30's password: > Couldn't stat remote file: Operation unsupported > File "flash:/flash:/vrpcfg.cfg" not found. > Received disconnect from 10.1.1.30: 2: The connection is closed by > SSH Server > Current FSM is SSH_Main_DisconnectLooks like your switch doesn't support the stat() operation, which sftp(1) uses before the download and will abort the download if the stat fails. You can try this patch, which is against OpenBSD's -current but should apply to 4.7 and 4.6 as well (and yeah, I know "goto" is bad, this is the minimum change to test the theory.) -- Darren Tucker (dtucker at zip.com.au) GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69 Good judgement comes with experience. Unfortunately, the experience usually comes from bad judgement.
On Sun, Nov 04, 2007 at 10:44:54AM -0800, Darren Tucker wrote:> You can try this patch..no patch. Please resend it for the archive. //Peter
On Sun, Nov 04, 2007 at 09:49:55AM -0700, Darren Tucker wrote:> Looks like your switch doesn't support the stat() operation, which > sftp(1) uses before the download and will abort the download if the > stat fails.probably yes.> > You can try this patch, which is against OpenBSD's -current but should > apply to 4.7 and 4.6 as well (and yeah, I know "goto" is bad, this is > the minimum change to test the theory.) >I tested it but the patch has no effect. (openssh version 4.6p1). regards, -- Milan Kocian
On Sun, Nov 04, 2007 at 09:49:55AM -0700, Darren Tucker wrote:> [...] > > Looks like your switch doesn't support the stat() operation, which > sftp(1) uses before the download and will abort the download if the > stat fails. > > You can try this patch, which is against OpenBSD's -current but should > apply to 4.7 and 4.6 as well (and yeah, I know "goto" is bad, this is > the minimum change to test the theory.) >Hello again, I tried to look at this in more detail. And here is ugly patch that works for me (in combination with yours). Here is log from sesssion: sftp> ls sftp> ls * aaa hw-http3.1.5-0043.web hw-http3.1.5-0049.web s5600-vrp310-r1510p06.bin s5600-vrp310-r1510p12.bin s5600_v408.btm vrpcfg.cfg vrpcfg.def sftp> get vrpcfg.cfg Fetching flash:/vrpcfg.cfg to vrpcfg.cfg Couldn't stat remote file: Operation unsupported flash:/vrpcfg.cfg 0% 2554 2.5KB/s 14948:06:54 sftp> So it seems to problem in glob. BTW. sftp client has a problem with names that contain spaces. --- openssh-4.3p2/openbsd-compat/glob.c 2005-11-10 07:02:22.000000000 +0100 +++ openssh-4.3p2.new/openbsd-compat/glob.c 2007-11-08 10:20:07.991115714 +0100 @@ -521,8 +521,8 @@ for (anymeta = 0;;) { if (*pattern == EOS) { /* End of pattern? */ *pathend = EOS; - if (g_lstat(pathbuf, &sb, pglob)) - return(0); + //if (g_lstat(pathbuf, &sb, pglob)) + // return(0); if (((pglob->gl_flags & GLOB_MARK) && pathend[-1] != SEP) && (S_ISDIR(sb.st_mode) || Regards, -- Milan Kocian
Maybe Matching Threads
- Problem in mailing list ?!
- sftp needs a long time for sending a filelist
- Can join ADS domain, all accounts/auth work fine, but leaving domain fails
- Linux Mint 21.3 client AD joined OK but no usb working
- Linux Mint 21.3 client AD joined OK but no usb working