lNet: Connect using ssh? lazarus / 38-Networking and Web Programming ---------------------------------------------------------------------- cov · 2009-03-20 08:41 Hi, I've managed to install lNet and am trying to communicate with a Linux box. Using the example Telnet program, I cannot connect on port 22: Code: [Select]SSH-2.0-OpenSSH_4.5 Protocol mismatch. Disconnected! Is there a way of doing this, possibly through SSL? The box that I'm trying to connect to has PAM installed which doesn't allow telnetd to accept logins. I've tried to install telnetd onto it, but it disconnects immediately on connection. In any case, if you google for how to install telnetd on a system, every thread contains plenty of posts about why this shouldn't be done and very few for how to do it. Generally this is regarded as a VERY BAD IDEA. ---------------------------------------------------------------------- Almindor · 2009-03-21 10:09 Is the telnet server listening on port 22? Does it expect immediate SSH or TLS? I must admit that I only used SSH with HTTP and SMTP so far. Depending on how the server expects things you might want to modify your logic. ---------------------------------------------------------------------- cov · 2009-03-21 10:29 Almindor: It's expecting SSH. How do you implement SSH? Is it possible? ---------------------------------------------------------------------- Almindor · 2009-03-23 16:52 Yes, you need to "plug in" the TLSSLSession[Component] into your main communication component (TLTelnet[Component]) with Code: [Select]Telnet.Session := SSLSession Where SSLSession is TLSSLSession configured as required. This tells the component that SSL sockets should be used with given session configuration. Since you expect SSL to be active right after connection you should set SSLActive to true (all this before first .connect). Hope this helps. ---------------------------------------------------------------------- ysun80 · 2012-05-17 18:10 Almindor, Do you know how to create CAFile and KeyFile in the TLSSLSession? I added TLSSLSession to telnet example, try to connect port 22 and using SSH. I need to set CAfile and Keyfile right?