I am trying to get a file from a Linux box(XXX) which is in private network from another Linux box(YYY) whixh is in public netwrok using Putty generate public private keys.
using command:
ssh.Connect("YYY");
SshPrivateKey privateKey2 = new SshPrivateKey("abc.ppk", password);
ssh.Login(username, privateKey2);
string command= "ssh -N -L 8022:XXX:22 -f YYY";
string response = ssh.RunCommand(command);
I keep getting the error.
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,gssapi-with-mic,password).
Connecting to localhost...
ssh: connect to host localhost port 8022: Connection refused
Couldn't read packet: Connection reset by peer
Please let me know what is the issue