A
A
Andrey Danilov2014-03-01 22:34:55
SSH
Andrey Danilov, 2014-03-01 22:34:55

How to programmatically connect to a database on nic.ru hosting?

nic.ru itself refers to SSH tunneling. Okay, let's do it (using SSH.NET):

using (var sshClient = new SshClient("ssh.login.nichost.ru", "login", "pass"))
            {
                sshClient.Connect(); // Тут вываливается экзепшн.
                var cmd = sshClient.RunCommand("ls"); // Пока что
                var output = cmd.Result; // для примера.
                // До туннелирования и подключения к БД дело даже не доходит.
            }

The password was generated in the corresponding section of your personal account to control access via SSH - everything is as it should be. Login and host are also 100% correct copied and pasted.
Exception text: " No suitable authentication method found to complete authentication ".
Trying to connect via PuTTY gives only access denied .

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
wladimirmir64, 2014-03-01
@wladimirmir64

Probably you need to first connect through Putty, otherwise there is no point in trying to programmatically connect to a non-working server

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question