This project is read-only.

Help with Renci SSH tool

Jul 13, 2013 at 10:16 PM
Hi All

I'm totally new with SSH and Renci specific.
I am looking for basic help and support in order to execute commands on Unix terminal.
I can execute simple ones like : "ls -ltr" or "pwd" , but when need to "cd /nfs/proj" .. or executing a perl script .. it just wont do .. :-(

The code i'm using -

Dim sshkey As New Renci.SshNet.PrivateKeyFile(System.Configuration.ConfigurationManager.AppSettings("SSH2key"))
    Dim conn2 As New Renci.SshNet.PrivateKeyConnectionInfo(modSSHHostName, modSSHUserName, sshkey)

    Dim sshClient As New Renci.SshNet.SshClient(conn2)

    'Need to hold the command
    Dim cmd As Renci.SshNet.SshCommand

    Using sshClient
        'connect to the server

        'Run the command and put the results into the cmd object. In this case
        'I am just running a directory list
        cmd = sshClient.CreateCommand("chdir /nfs/iil/proj")

        'Close the connection.
    End Using

Please assist me as much as you can , thanks in advance.