<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — Unable to connect wolfssh with Cisco IOS device]]></title>
		<link>https://www.wolfssl.com/forums/topic1551-unable-to-connect-wolfssh-with-cisco-ios-device.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1551.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Unable to connect wolfssh with Cisco IOS device.]]></description>
		<lastBuildDate>Fri, 22 May 2020 21:43:33 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Unable to connect wolfssh with Cisco IOS device]]></title>
			<link>https://www.wolfssl.com/forums/post5261.html#p5261</link>
			<description><![CDATA[<p>Hi jijo7thomas,</p><p>As the error indicates it would seem the wrong version or a non-supported version was used. Do you know which SSH version was sent?</p><p>Warm Regards,</p><p>K</p>]]></description>
			<author><![CDATA[null@example.com (Kaleb J. Himes)]]></author>
			<pubDate>Fri, 22 May 2020 21:43:33 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5261.html#p5261</guid>
		</item>
		<item>
			<title><![CDATA[Unable to connect wolfssh with Cisco IOS device]]></title>
			<link>https://www.wolfssl.com/forums/post5252.html#p5252</link>
			<description><![CDATA[<p>I&#039;m trying to connect to a Cisco IOS device using SSH from Windows.</p><p>Following is the snippet</p><div class="codebox"><pre><code>WOLFSSH_CTX* ctx = NULL;
    WOLFSSH* ssh = NULL;
    SOCKET_T sockFd = WOLFSSH_SOCKET_INVALID;
    SOCKADDR_IN_T clientAddr;
    socklen_t clientAddrSz = sizeof(clientAddr);
    char rxBuf[80];
    int ret;
    int ch;
    word16 port = 22;
    const char* host = &quot;xx.xx.xx.xx&quot;;
    const char* username = &quot;wwww&quot;;
    const char* password = &quot;wwww&quot;;
    const char* cmd = &quot;sh clock&quot;;

    wolfSSH_Debugging_ON();

    WSTARTTCP();
    wolfSSH_Init();

    ctx = wolfSSH_CTX_new(WOLFSSH_ENDPOINT_CLIENT, NULL);
    if (ctx == NULL)
        err_sys(&quot;Couldn&#039;t create wolfSSH client context.&quot;);

    wolfSSH_SetUserAuth(ctx, wsUserAuth);

    ssh = wolfSSH_new(ctx);
    if ( ssh == NULL ) {
        err_sys(&quot;Failed to create SSH&quot;);
    }

    wolfSSH_SetUserAuthCtx(ssh, (void*)password);

    ret = wolfSSH_SetUsername(ssh, username);
    if (ret != WS_SUCCESS)
        err_sys(&quot;Couldn&#039;t set the username.&quot;);

    build_addr(&amp;clientAddr, (char *)host, port);
    tcp_socket(&amp;sockFd);
    ret = connect(sockFd, (const struct sockaddr *)&amp;clientAddr, clientAddrSz);
    if (ret != 0) {
        err_sys(&quot;Couldn&#039;t connect to server.&quot;);
    }
    else {
        cout &lt;&lt; &quot;Connected to &quot;&lt;&lt;host&lt;&lt;endl;
    }

    ret = wolfSSH_set_fd(ssh, (int)sockFd);
    if (ret != WS_SUCCESS)
        err_sys(&quot;Couldn&#039;t set the session&#039;s socket.&quot;);



    ret = wolfSSH_SetChannelType(ssh, WOLFSSH_SESSION_EXEC,
        NULL, 0);</code></pre></div><br /><p>Seeing the following error log</p><div class="codebox"><pre><code>2020-05-13 07:01:55 [DEBUG] Entering wolfSSH_Init()
2020-05-13 07:01:55 [DEBUG] Leaving wolfSSH_Init(), returning 0
2020-05-13 07:01:55 [DEBUG] Entering wolfSSH_CTX_new()
2020-05-13 07:01:55 [DEBUG] Entering CtxInit()
2020-05-13 07:01:55 [DEBUG] Leaving wolfSSH_CTX_new(), ctx = 00000072FB1E7D80
2020-05-13 07:01:55 [DEBUG] Entering wolfSSH_new()
2020-05-13 07:01:55 [DEBUG] Entering SshInit()
2020-05-13 07:01:55 [DEBUG] Entering HandshakeInfoNew()
2020-05-13 07:01:55 [DEBUG] Leaving wolfSSH_new(), ssh = 00000072FB1E93E0
Connected to xx.xx.xx.xx
2020-05-13 07:01:55 [DEBUG] Entering wolfSSH_set_fd()
2020-05-13 07:01:55 [DEBUG] No subsystem name or name was too large
2020-05-13 07:02:04 [DEBUG] Entering wolfSSH_connect()
2020-05-13 07:02:30 [DEBUG] SSH-2.0-wolfSSHv1.4.3

2020-05-13 07:02:30 [DEBUG] Entering wolfSSH_SendPacket()
2020-05-13 07:02:30 [DEBUG] Embed Send trying to send 23
2020-05-13 07:02:30 [DEBUG] Embed Send sent 23
2020-05-13 07:02:30 [DEBUG] SB: Shrinking output buffer
2020-05-13 07:02:30 [DEBUG] Entering ShrinkBuffer()
2020-05-13 07:02:30 [DEBUG] SB: usedSz = 0, forcedFree = 0
2020-05-13 07:02:30 [DEBUG] SB: releasing dynamic buffer
2020-05-13 07:02:30 [DEBUG] Leaving ShrinkBuffer()
2020-05-13 07:02:34 [DEBUG] connect state: CLIENT_VERSION_SENT
2020-05-13 07:02:41 [DEBUG] Receive: recvd = 255
2020-05-13 07:03:30 [DEBUG] get input text failed
2020-05-13 07:03:35 [DEBUG] connect error: CLIENT_VERSION_SENT, -1013</code></pre></div><p>Any idea about what went wrong?</p>]]></description>
			<author><![CDATA[null@example.com (jijo7thomas)]]></author>
			<pubDate>Thu, 14 May 2020 05:51:21 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post5252.html#p5252</guid>
		</item>
	</channel>
</rss>
