Announcement

Collapse
No announcement yet.

sshclient to localhost?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • sshclient to localhost?

    I modified sshclient.c slightly to attempt to connect to the cli via ssh using
    127.0.0.1.

    SSHClientConnection_open() returns NULL no matter what I do. How can I make this work? Alternatively, is there a telnet client I can use to get to the
    local cli? I'm just trying to initiate "xcr export <filename>" under program control.

    I've used putty ssh from a windows box successfully with this configuration to the wlan0 interface.

    I just modified these lines:
    #define SSH_SERVER_COMMAND_LINE_TOKEN ">"
    #define SSH_SERVER_COMMAND "show"
    #define SSH_SERVER_ADDRESS "127.0.0.1"
    #define SSH_SERVER_USER_NAME "bob"

    as well as using wlan0 instead of eth0 for dhcp testing, which shouldn't matter for localhost. I have a wlan0 connection, but no eth0 connection.

    I created user bob on both the ssh client and server side. As well as generating the host key on the server side and copying that key over to the
    client side.

    Attached is the complete source code based on sshclient.c.
    Attached Files
Working...
X