0

Can TIdTelnet (Indy10) do the following?

  • CD through directores
  • LS directories
  • download files
  • Log in through a "secured shell"?

I see in many questions that TIdTelnet is very specialized and may not always be the appropriate component to use. However, for the reference, the server I need to code my software to work with seems to be compaitible with popular SSH clients.

As far as I can tell from Google, I ought only need to attach TidTelnet to a SSH handler (but apparently there are not many alternatives for this) and TidTelnet then ought to work for above?

Tom
  • 3,587
  • 9
  • 69
  • 124
  • I think this question is better suited for Superuser or ServerFault maybe? – marteljn Mar 11 '13 at 23:50
  • 1
    with Putty you can use Telnet, but you mainly use it to connect to a SSH server, since to connect to a Telnet server you have the builtin `telnet` windows client. – jachguate Mar 12 '13 at 00:02
  • 2
    The Putty stuff was off-topic, @Marteljn, but the Indy part is fine here. The Putty stuff is irrelevant to the question about what Indy supports, so I've simply removed it. – Rob Kennedy Mar 12 '13 at 00:06
  • Here's an outline of why I asked like I did: The reason I mention puTTy is that it claims to be using Telnet. But I found some SO entries where Indy TCP was recommended instead of TidTelnet for shell access because most servers are apparently? not actually using Telnet for shell...? As I have zero shell experience, I can't put those statements in context... I just wondered that if i could do the necessary commands in a shell on server using puTTy (which claims to be Telnet) if I could then also do them in TidTelnet. (And then I specificed which commands exactly I was most interested in.) – Tom Mar 12 '13 at 01:51
  • The reason this was closed... Was that there was in a way multiple questions? (i.e. implicit if TidTelnet was a full Telnet implemention [I guess it is], and then specificly if it could do what I know I need to program here and now - download files) – Tom Mar 12 '13 at 08:51
  • 1
    The reason given with the initial close vote was that it was off topic. Someone not reading it carefully might even agree with that reason. I edited the question to remove the off-topic part and stick to the programming question. I hope the subsequent votes gave a different reason for closing, but there's no way for us to tell unless the voters explain themselves. – Rob Kennedy Mar 12 '13 at 12:23
  • IMHO, you first have to learn what protocols and technologies are involved in connecting to the particular server you want to work with. For that, I think SuperUser is a more suited place to ask questions. When you know exactly what's involved, you can resort to StackOverflow with specific programming questions (if you have any) to create your own client application. Other way, this would be a very long comment thread with off topic questions/answers, and that's not the purpose here. – jachguate Mar 12 '13 at 18:49
  • @jachguate I already earlier corrected it from telnet to SSH. I also searched (and hence alread updated question) Google where some people are stating they can use TidTelnet if setting TIdTelnet.IOHandler using a SecureBridge solution. Apparently they are the only ones offering this asfar as I can tell.) So while searching Google and reading Wikipedia (but yes, I have not studied ieee) it would seem SSH may implement different commands than telnet beyond the security aspects... And yes, some people are seemingly using TidTelnet for SSH as well. (Okay, SF/SU could also be good.) – Tom Mar 12 '13 at 19:39
  • @jachguate Anyhow, I have removed the note abot OpenSSL for SSL. I just figured it was possible a handler would need OpenSSL for Indy TidTelnet like OpenSSL is used to provide the encryption routines for https in Indy TTidHTTP. (However, since my research indicates it is not so, I will not confuse the question by mentioning it in main text.) – Tom Mar 12 '13 at 19:48
  • For reference: http://stackoverflow.com/questions/4235714/ftp-over-ssh-sftp-in-delphi-2010 – Tom Mar 13 '13 at 01:24

2 Answers2

1

No. Telnet is never a file transfer protocol.

It provides you with an unencrypted remote shell on some devices that still support telnet. Most real host computers running Linux and so on only provide remote shells with ssh.

Navigating remote file systems is done with ssh+sftp or FTP or with other protocols such as http+WebDAV

Telnet has No file transfer capabilities. Why didn't you just look a TidTelnet for yourself the code is not difficult to read.

Indy library has many components and why you are fixated on Telnet is beyond my ability to guess.

Warren P
  • 65,725
  • 40
  • 181
  • 316
  • 1) Because client has stated there would only be shell (later clarified as SSH), no FTP or web access. 2) judging what is the best telnet/SSH/shell solution for Delphi is not that trivial. I guessed on TidTelnet based on Google. For it to work with SSH you need to buy from 3rd party to hook up its IOHandler. (So from what I can read, TidTelnet is usable for SSH as well) 3) It seems SSH client software supports downloading. I asked on SuperUser wich confirmed what I had Googled (and at least on superuser answers have so far been that it does not require require other services running) – Tom Mar 14 '13 at 00:42
  • 1
    If you MUST use SSH+SFTP I am not aware of any free Delphi code solution but I have used Secure black box. It's not open source or free, but it's good. – Warren P Mar 14 '13 at 12:49
1

Telnet doesn't do file transfers by itself, but you can run something like x,y, or zmodem via telnet to transfer files:

xmodem -s passwords.txt

It's not very useful though.

  • To find files, you'll have to parse the results of ls manually.
  • You first need to disable escape commands for the telnet connections; otherwise, if the wrong characters are in the file, it will will trash your connection. :)
  • It's all unencryped

It's probably a better idea to just use a protocol that's meant to work with files:

So, to conclude, Telnet is probably not the protocol that you want to be using here.

Wouter van Nifterick
  • 23,603
  • 7
  • 78
  • 122
  • Thanks for the claraficiation. I have SSH. I stopped talking about Telnet a while ago after I realized SSH was apparently not just Telnet with encryption. (Of course, if one wants to use Indy for SSH, it appears you have to use TidTelnet with a 3rd party IOHandler, but maybe I read it wrong.) From comments here, I realize I should probably also have SFTP or SCP or similar if I have SSH, so I guess it is possible I misunderstood the client. (Which said it was SSH only as I asked if there were other alternatives.) – Tom Mar 14 '13 at 11:37