You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I try to write program for test to use ssh-j.com in my application
bug targetClient.Connect(); go timeout why ?
class Program
{
static void Main()
{
string path = System.IO.Directory.GetCurrentDirectory();
Console.WriteLine("Benvenuto nella simulazione di una shell SSH. Digita 'exit' per uscire.");
Console.WriteLine("Percorso corrente:" + path);
string jumpHost = "ssh-j.com";
string jumpUsername = "foo";
string jumpPassword = "";
string targetUsername = "paolob";
string targetPrivateKeyPath = "id_rsa"; // Percorso alla chiave privata del server di destinazione
PrivateKeyFile targetPrivateKey = new PrivateKeyFile(targetPrivateKeyPath);
using (SshClient jumpClient = new SshClient(jumpHost, jumpUsername, jumpPassword))
{
jumpClient.Connect();
var jumpForwardedPort = new ForwardedPortDynamic("127.0.0.1", 22);
jumpClient.AddForwardedPort(jumpForwardedPort);
jumpForwardedPort.Start();
PrivateKeyAuthenticationMethod am = new PrivateKeyAuthenticationMethod(targetUsername, targetPrivateKey);
var connectionInfo = new ConnectionInfo(jumpForwardedPort.BoundHost, (int)jumpForwardedPort.BoundPort, targetUsername, am);
using (SshClient targetClient = new SshClient(connectionInfo))
{
targetClient.Connect();
The text was updated successfully, but these errors were encountered:
Hi, I try to write program for test to use ssh-j.com in my application
bug targetClient.Connect(); go timeout why ?
class Program
{
static void Main()
{
string path = System.IO.Directory.GetCurrentDirectory();
Console.WriteLine("Benvenuto nella simulazione di una shell SSH. Digita 'exit' per uscire.");
Console.WriteLine("Percorso corrente:" + path);
string jumpHost = "ssh-j.com";
string jumpUsername = "foo";
string jumpPassword = "";
string targetUsername = "paolob";
string targetPrivateKeyPath = "id_rsa"; // Percorso alla chiave privata del server di destinazione
PrivateKeyFile targetPrivateKey = new PrivateKeyFile(targetPrivateKeyPath);
using (SshClient jumpClient = new SshClient(jumpHost, jumpUsername, jumpPassword))
{
jumpClient.Connect();
The text was updated successfully, but these errors were encountered: