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

New Post: Program Hanging after changing ip

$
0
0
Hello all and straight to the problem.
using (var client = new SshClient(ipTXT.Text, userTXT.Text, passwordTXT.Text))
            {
                consoleTXT.Text = "Connecting..."+"\r\n";
                client.ConnectionInfo.Timeout = TimeSpan.FromSeconds(3);
                try
                {
                    client.Connect();
                    consoleTXT.Text += "Connected" + "\r\n";
                    client.RunCommand("cp /etc/network/interfaces /home/pi/interfaces");
blah blah blah change  the ip and just before the end I do this:
client.RunCommand("sudo /etc/init.d/networking restart");
client.Disconnect();
everything works, the ip changes. The problem is that my form hangs after the networking restart obv because I am changing the ip. Is there anything I can do?

Thank you

Viewing all articles
Browse latest Browse all 1729

Trending Articles



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