Quantcast
Channel: sshnet Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1729

New Post: How to enter the folder with diacritics

$
0
0

Hi,

I just made some changes and fixes so I think it should work now. In my tests I could create files and run commands and get result I expected.

Here is a code example.

using (SshClient ssh = new SshClient(connectionInfo))
            {
                ssh.Connect();var cmd = ssh.CreateCommand("echo \"С Рождеством\"", Encoding.GetEncoding(1251));var result = cmd.Execute();
                ssh.Disconnect();
            }

Or you can also specify encoding in connection object. I added a new property called Encoding which does just that so here is another example:

            connectionInfo.Encoding = Encoding.GetEncoding(1251);using (var scp = new ScpClient(connectionInfo))
            {
                scp.Connect();
                scp.Upload(new FileInfo(@"D:\test.key"), "дество2.ru");
                scp.Disconnect();
            }

Please let me know if you have any more problems or questions.

Thanks,

Oleg


Viewing all articles
Browse latest Browse all 1729

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>