Question:
I can create, open and autenticate a SSH object. but when i try to create a TCPIP-channel i get the following error:
ChilkatLog:
OpenDirectTcpIpChannel:
DllDate: Apr 14 2012
UnlockPrefix: xxx Username: xxx:developer
Architecture: Little Endian; 32-bit
Language: .NET 2.0
SshVersion: SSH-2.0-OpenSSH_4.5p1
hostname: 10.136.174.11
port: 3391
channelType: direct-tcpip
clientChannel: 0
clientInitialWindowSize: 327680
clientMaxPacketSize: 8192
directTcpHost: 10.136.174.11
directTcpPort: 3391
originatorIP: 172.16.10.25
originatorPort: 63180
Sent open channel request
retval: -1
--OpenDirectTcpIpChannel
--ChilkatLog
My code works with other SSHservers. Why doesn't any of the internal IP's work with this one?
// Connect to an SSH server: string hostname; int port;
// Hostname may be an IP address or hostname:
hostname = SshServerIP;
port = int.Parse(SshServerPort);
bool success = ssh.Connect(hostname, port);
if (success != true)
{
string s = ssh.LastErrorText;
return;
}
// Wait a max of 5 seconds when reading responses..
ssh.IdleTimeoutMs = 5000;
// Authenticate using login/password:
string user = SshServerUsername;
string pass = SshServerPassword;
success = ssh.AuthenticatePw(user, pass);//SshServerUsername, SshServerPassword);
if (success != true)
{
string s = ssh.LastErrorText;
return;
}
int channelNum;
channelNum = ssh.OpenDirectTcpIpChannel(SshInternalIP, int.Parse(SshInternalPort));
if (channelNum < 0)
{
string s = ssh.LastErrorText;
return;
}
You are using an old version. ALWAYS make sure to first see if the newest version fixes a problem. Release notes are at http://www.cknotes.com/ The version you are using is 2 years old...