VanDyke Software Forums

Go Back   VanDyke Software Forums > SecureCRT 5.1/SecureFX 3.1/VShell 2.6 Beta
User Name
Password
FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Display Modes
  #1  
Old 02-03-2005, 01:06 AM
undef undef is offline
Registered User
 
Join Date: Dec 2004
Posts: 13
SFTP implementation in SecureCRT 5.0

Let me first say that it's possible that my problem may be that all I'm wondering about can be set via some configuring option, but if that's so I can't seem to find in. OK:

The nicest new function in SecureCRT, apart from tabs, is the possibility to open an SFTP session by right clicking the tab. As it is today, however, I feel that it lacks a few functions for it to be really usable.

1. If I'm not missing anything I can't use <- and -> keys to navigate back and forth on a line. Only control codes gets output on screen. Very annoying.

2. Backspace also just causes a control code, you have to use delete. At the very least you should be able to configure backspace and del to switch functions, as you can do in the terminal.

3. There's no command line history. Arrow up and down should give me an option to browse history.

4. Is lcd not implemented?

5. When I open an SFTP tab, is it at all possible for the application to know what directory I'm currently in on the server side, so that SFTP opens in that directory?

6. Perhaps SFTP should locally open in another directory than the program folder? My suggestion would be to open in the users home directory (i.e. c:\Documents and Settings\<username>\). Preferably this should be an configurable option.
  #2  
Old 02-03-2005, 09:08 AM
c0w c0w is offline
Registered User
 
Join Date: Nov 2004
Posts: 15
i agree with everything about also another thing that it think is missing is the tab complete functionality.

c0w
  #3  
Old 02-04-2005, 11:25 AM
galb galb is offline
VanDyke Developer
 
Join Date: Feb 2004
Posts: 35
Quote:
Originally Posted by undef
1. If I'm not missing anything I can't use <- and -> keys to navigate back and forth on a line. Only control codes gets output on screen. Very annoying.
Yes; as both a developer and a user of this feature, the lack of line
editing is frustrating. I've entered an incident for this. (TT #9827)

Quote:
Originally Posted by undef
2. Backspace also just causes a control code, you have to use delete. At the very least you should be able to configure backspace and del to switch functions, as you can do in the terminal.
Hmm... this does work for me. What control code is echoed? Is it ^H, or
a more complicated sequence?

Do you have Session Options / Terminal / Emulation / Mapped Keys / Backspace sends delete checked? Is Backspace mapped on the Mapped Keys tab or in your
keymap?

Either of these cases would cause you problems, though I just checked in a fix
for this.

Quote:
Originally Posted by undef
3. There's no command line history. Arrow up and down should give me an option to browse history.
I just checked this in, so you should see it in the next code drop.

Quote:
Originally Posted by undef
4. Is lcd not implemented?
It works for me... can you describe what you are seeing that makes you
think it isn't?

Quote:
Originally Posted by undef
5. When I open an SFTP tab, is it at all possible for the application to know what directory I'm currently in on the server side, so that SFTP opens in that directory?
Ahh, yes. This is quite a trick.

We do have a way for this to work... but it is broken in the current builds.
I checked a fix in yesterday, so again, it should work in the next alpha
drop.

But!, for this to work, you have to:

a. Turn on Global Options / Terminal / Enable execute Escape Sequence
(it is in the options group box on that page.)

b. Send the following escape sequence from the remote system
to open the tab window. (This is the only way it can work, because
SCRT doesn't know what directory you are currently on the remote side):

<esc>&&Bsftp-session <directory to open in>\n

Under unix, the following command will do it:

echo "^[&&Bsftp-session `pwd`"

(To get the ^[, type ctrl+V,ctrl+[.)

In addition, the following escape sequences work:

<esc>&&Bsftp-upload `pwd`

<esc>&&Bsftp-download `pwd` file-or-dir [more file or dirs]

I have the download one in a sh script:

#!/bin/sh
echo "^[&&Bsftp-download `pwd` $*"

And then I have an alias 'down' which points to the sh script.

So I can type down * and get a recursive copy of my current working
directory for example.

Quote:
Originally Posted by undef
6. Perhaps SFTP should locally open in another directory than the program folder? My suggestion would be to open in the users home directory (i.e. c:\Documents and Settings\<username>\). Preferably this should be an configurable option.
I've created an incident for this one, TT # 9829, though I think
the default should probably be My Documents (which isn't necessarily
in C\Documents and Settings even.)

I also think it might be nice if SCRT remembered the last local directory
you used for that session. (This is no gaurentee that what I think
will get done though... I'm notoriously bad at decisions like this :-)

Thanks for the valuable feedback.

Joseph
  #4  
Old 02-04-2005, 11:48 AM
galb galb is offline
VanDyke Developer
 
Join Date: Feb 2004
Posts: 35
Quote:
Originally Posted by c0w
i agree with everything about also another thing that it think is missing is the tab complete functionality.
c0w
I've added an incident for this, #9832.

I too want this feature-- I'm forever hitting tab and then going, 'Argh, doesn't work!'

Unfortunately, this one isn't a trivial one to add. (If I had to guess, I'd say it probably won't make 5.0-- but we'll have to wait and see. Maybe someone will decide to do it on a weekend :-)

One possible workaround is to use the * for completions-- it isn't quite as nice, I know.

For example, the following should work:

cd *
(If there is only one file in your current directory, and it is a directory.)

cd Fly*
(If Fly* resolves to exactly one thing and it is a directory.)

Thanks,

Joseph
  #5  
Old 02-04-2005, 01:06 PM
undef undef is offline
Registered User
 
Join Date: Dec 2004
Posts: 13
Quote:
Hmm... this does work for me. What control code is echoed? Is it ^H, or a more complicated sequence?
The code is ^? ("hat" + "question mark" )

Quote:
Do you have Session Options / Terminal / Emulation / Mapped Keys / Backspace sends delete checked? Is Backspace mapped on the Mapped Keys tab or in your keymap?
Yes I did. Uncheking these made backspace act normally. I don't want to be sound too critical, but I can't say it's obvious that these settings should affect the sftp tab.

Do you know why ^U ("hat" + U) is written to screen when I've deleted all the way to the start of the line?

Regarding "lcd" not being implemented, maybe I'm just confused by trying to do this (I've tried all of these):

lcd c:\Documents and Settings
lcd 'c:\Documents and Settings'
lcd "c:\Documents and Settings"
lcd c:/Documents\ and\ Settings

So it seems as if lcd works on directory names without spaces, but not those with. Or do I lack some basic knowledge to get this to work?

I do agree with you that My Documents is a better place to open by default, and if you could get SFTP tab to remember from last time what folder to open, that would be cool to. But perhaps it then should be a settable option, or that the current local working directory should be output on screen on logon, so that you actually remember where you were.
  #6  
Old 02-04-2005, 02:15 PM
galb galb is offline
VanDyke Developer
 
Join Date: Feb 2004
Posts: 35
Quote:
Originally Posted by undef
The code is ^? ("hat" + "question mark" )

Yes I did. Uncheking these made backspace act normally. I don't want to be sound too critical, but I can't say it's obvious that these settings should affect the sftp tab.
It doesn't anymore :-)

Quote:
Originally Posted by undef
Do you know why ^U ("hat" + U) is written to screen when I've deleted all the way to the start of the line?
I fixed that as well when I did the command line history and fixed the BS character.

When we did the SFTP tab support, we just grabbed the telnet protocol line mode code to do the input processing, and hadn't spent much time giving it more functionality. (Nobody had asked for it yet :-)

My guess is that some other telnet client out there displays ^U when you backup past the first character, and we just tried to do what was familiar to people using that interface.

Quote:
Originally Posted by undef
Regarding "lcd" not being implemented, maybe I'm just confused by trying to do this (I've tried all of these):

lcd c:\Documents and Settings
lcd 'c:\Documents and Settings'
lcd "c:\Documents and Settings"
lcd c:/Documents\ and\ Settings

So it seems as if lcd works on directory names without spaces, but not those with. Or do I lack some basic knowledge to get this to work?
Hmmm.... not sure what is going on here.

The format lcd "C:\Documents and Settings" should work.

When you try that, what is the error you get?

Quote:
Originally Posted by undef
I do agree with you that My Documents is a better place to open by default, and if you could get SFTP tab to remember from last time what folder to open, that would be cool to. But perhaps it then should be a settable option, or that the current local working directory should be output on screen on logon, so that you actually remember where you were.
That might not be a bad idea anyway (to display the local working directory); I've added your comments to the incident report.

Thanks,

Joseph
  #7  
Old 02-07-2005, 12:05 AM
undef undef is offline
Registered User
 
Join Date: Dec 2004
Posts: 13
Quote:
Originally Posted by galb
It doesn't anymore :-)
Hmmm.... not sure what is going on here.

The format lcd "C:\Documents and Settings" should work.

When you try that, what is the error you get?
sftp> lcd "c:\Documents and Settings\"
Systemet finner ikke angitt fil.

The above message is norwegian, and means something like "The system can't find the specified file". I guess this is a Windows message, since it is localized.
  #8  
Old 02-07-2005, 12:07 AM
undef undef is offline
Registered User
 
Join Date: Dec 2004
Posts: 13
Arrow I found the problem myself!

[QUOTE=undef]sftp> lcd "c:\Documents and Settings\"[QUOTE]

As soon as I posted my last message I realized what's wrong. I'm used to type in the trailing backslash (or slash on Unix platforms) when I'm CD-ing, but apparently this software interprets the trailing backslash as something else than a directory. So if I write

Code:
lcd "c:\Documents and Settings"
everything's fine and dandy! Maybe you could check for trailing backslashes and remove them "behind the scenes"?
  #9  
Old 02-08-2005, 08:52 PM
galb galb is offline
VanDyke Developer
 
Join Date: Feb 2004
Posts: 35
Quote:
Originally Posted by galb
Yes; as both a developer and a user of this feature, the lack of line
editing is frustrating. I've entered an incident for this. (TT #9827)
I just checked in a fix for this, so line editing should be in the next code drop as well.

(In addition, I fixed the bug of not being able to BS over all the characters if their were control codes in the buffer -- a display problem, the buffer was actually empty. It seems like that was reported on this thread someplace.)

Thanks,

Joseph
  #10  
Old 02-16-2005, 02:44 AM
undef undef is offline
Registered User
 
Join Date: Dec 2004
Posts: 13
Quote:
Originally Posted by galb
<esc>&&Bsftp-session <directory to open in>\n

Under unix, the following command will do it:

echo "^[&&Bsftp-session `pwd`"
Thanks! This did exactly what I wanted! Are there other escape sequences I can send as well? If this is possible to do with "Clone Session" as well, this will be "the most welcome feature I didn't know I wanted before I saw it".
  #11  
Old 02-16-2005, 03:41 AM
undef undef is offline
Registered User
 
Join Date: Dec 2004
Posts: 13
Logout on CTRL+D

Just one last thing, and I'll stop bugging you

Thanks for adding line editing to sftp in the latest release. Is it possible to add support for CTRL+D to be interpreted as quit/exit as well? If so, this would be consistent with other clients I use.
  #12  
Old 02-16-2005, 02:28 PM
galb galb is offline
VanDyke Developer
 
Join Date: Feb 2004
Posts: 35
Quote:
Originally Posted by undef
If this is possible to do with "Clone Session" as well, this will be "the most welcome feature I didn't know I wanted before I saw it".
Unfortunately, I can't think of a really good, clean way to have this work with clone session.

It works with SFTP because SFTP has a well defined way of managing your current working directory (well, actually, SFTP has no concept of your current working directory, so SCRT is managing that for you, so once the escape sequences tells us where to start it is easy to prime the pump with that.)

Shell on the other hand have no well defined way to set the working directory.
  #13  
Old 02-16-2005, 04:26 PM
galb galb is offline
VanDyke Developer
 
Join Date: Feb 2004
Posts: 35
Quote:
Originally Posted by undef
Thanks for adding line editing to sftp in the latest release. Is it possible to add support for CTRL+D to be interpreted as quit/exit as well? If so, this would be consistent with other clients I use.
I just checked this in, so it will be in the next code drop.

Thanks,

Joseph
  #14  
Old 02-17-2005, 11:57 AM
galb galb is offline
VanDyke Developer
 
Join Date: Feb 2004
Posts: 35
Quote:
Originally Posted by galb
Unfortunately, I can't think of a really good, clean way to have this work with clone session.

...

Shell on the other hand have no well defined way to set the working directory.
I have created a incident for this, incident #9923.

I have been investigating a couple of ways to accomplish this-- a couple of ideas are:
  • Extend the ssh2 protocol to make this possible. (I've introduced this idea on the ietf ssh mailing list and it is under discussion.
  • SCRT could use the existing SSH2 protocol to set and environment variable, which your .login / .bash_profile / whatever login script could then check and change your directory appropriately. This would require some admin action for open ssh servers to add the environment variabel we send to the list of allowed variables. And some server (our's for example) don't currently support setting environment variables using the ssh2 protocol.
  • We could send cd <path> as the first line of shell input before we let you start typing. This won't work for exec commands though or for non-standard shells that don't use the cd command. (For example, OpenVMS uses set default [my.path] to change directories.)

I don't know if or which or when any of these would be implemented though.

It would be a cool feature.
  #15  
Old 04-28-2005, 12:02 PM
Maureen's Avatar
Maureen Maureen is offline
VanDyke Product Director
 
Join Date: Feb 2004
Location: Albuquerque, NM
Posts: 1,612
Quote:
Originally Posted by c0w
i agree with everything about also another thing that it think is missing is the tab complete functionality.

c0w
This was recently implemented and will be in the next beta. If you'd like to try an interim build, please send e-mail to me at Maureen.Jett@vandyke.com.

Maureen
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 04:07 PM.


© copyright 1995-2017 VanDyke Software, Inc.