SFTP vs. FTPS

Clarification on the acronyms “SFTP” and “FTPS” “SFTP” is the Secure File Transfer Protocol over SSH.  It is a protocol unrelated to the FTP protocol. (It is actually a subsystem of SSH.)  The Chilkat SSH / SFTP component is used for “SFTP”.  SFTP is achieved by connecting to an SSH server at port 22. On the other hand, the Chilkat […]

SSH SendReqExec — Interactive Commands such as “more”

Commands that assume an interactive user at a shell prompt should not be passed to SendRequestExec.  For example, the “more” command assumes there is a shell and that the user will press RETURN when another screenful of text is wanted.  It would be more appropriate to use the Unix/Linux “cat” command w/ SendRequestExec. To run interactive commands, one should instead […]

SSH SendReqExec — Commands with No Output

When a command is passed to SendReqExec that produces no output, such as “echo 1 > test.txt”, then do not try to read the channel (such as by calling ChannelReadAndPoll) because no data will be forthcoming and the channel read will timeout (as expected). The correct sequence of method calls would be to: Call SendReqExec to execute the command on […]

SSH / SFTP – Too much time between connect and authentication

The Solution: Issue solved.   The problem was, that we stepped through the code and because of that too much time elapsed between connect and authentication.  As we ran the program without breakpoints it worked. The Problem: The AuthenticatePw method failed and the LastErrorText contained this information: ChilkatLog: AuthenticatePw: DllDate: Jan 31 2010 UnlockPrefix: *** Username: *** Component: .NET 2.0 SshVersion: […]

Very simple C# SSH Shell Console Terminal

Here’s an example that demonstrates a rough start to creating a C# console SSH shell terminal (where the user can type commands and output from the remote command echos to the console: using System; using System.Collections.Generic; using System.Text; using System.IO; namespace SshTerminalConsole { class Program { static void Main(string[] args) { Chilkat.Ssh ssh = new Chilkat.Ssh(); ssh.UnlockComponent(“Test”); // Hostname may […]

Converting a PuTTY Private Key (.ppk) to OpenSSH (.pem)

ASP: Convert PuTTY Private Key (ppk) to OpenSSH (pem) SQL Server: Convert PuTTY Private Key (ppk) to OpenSSH (pem) C#: Convert PuTTY Private Key (ppk) to OpenSSH (pem) C++: Convert PuTTY Private Key (ppk) to OpenSSH (pem) MFC: Convert PuTTY Private Key (ppk) to OpenSSH (pem) C: Convert PuTTY Private Key (ppk) to OpenSSH (pem) Delphi: Convert PuTTY Private Key […]

su Supported by Chilkat SSH for Linux/Unix Servers?

Question: I don’t see anything in the documentation or examples to indicate that “su” is supported w/ SSH?  Is it possible to login to a user account and then “su” to root? Answer: “su” is a command just like any other Unix/Linux command. It is typed at the command prompt, it does something, and a response is written to standard […]

SFTP and SSH: Separate Connections Required?

Question: I have an application using your code that does several SSH and SFTP command during processing. Can I just establish a connection, authenticate passwords and the other setup steps once and then use that connection throughout the program or do I need to perform these steps in every function? If I can do I need a separate connection for […]

SSH: Failed to read 1st key exchange packet

Here’s an explanation for the following error message: Established TCP/IP connection with SSH server FromServer: SSH-1.5-Cisco-1.25 numBytesRequested: 8 Connection closed by server. Failed to read data on SSH connection. Failed to read 1st key exchange packet Failed. The error message indicates that as soon as the TCP/IP socket connection was accepted by the SSH server, it then decided to disconnect. […]