Archived Forum Post

Index of archived forum posts

Question:

Connect & Authenticate ssh ok but can't open tpcip channel or send SMTP

Jan 23 '14 at 20:09

CkSsh ssh; bool success = ssh.UnlockComponent("Anything for 30-day trial"); char hostname[100] = "173.208.107.42"; int port = 22; success = ssh.Connect(hostname,port); if (success != true) { strOut.append(ssh.lastErrorText()); AfxMessageBox(strOut.getString()); return; ``} ssh.put_IdleTimeoutMs(10000);

//  Authenticate using login/password:
success = ssh.AuthenticatePw("admin","admin");
if (success != true) {
    strOut.append(ssh.lastErrorText());
    AfxMessageBox(strOut.getString());
    return;
}
long channelNum;
channelNum = ssh.OpenDirectTcpIpChannel("www.chilkatsoft.com",80);

I got channelNum = -1 and reason code is 2 although ssh connect and authenticate success. I got reason code 2 but didn't know why it can't open an channel tcpip. I tried with another 10 sshhost name (all tested with bitwise is ok) but the same problem with above. Send email is the same problem when put sshhostname,sshuser,sshpass. I using bitwise tunnel to create sockks5 127.0.0.1 then attach to firefox it works. Anyone know Please let me know what is the problem ? Thank you