SSH example ?

Can someone please point me in the direction of an example of how to use secure shell in xojo to overwrite a file on a server. Just a simple file server overwrite…

Try this. Create a property ‘s’ as type Shell. Then, write the following code in the pushbutton’s action:

s = New Shell
s.Mode=2
s.Execute “sh”
s.Write “scp /Users/[…PATH]/[FILE] [USERHOME]@[DOMAIN]:/Users/[…PATH]/[FILE]”
s.Write Chr(10)
Timer1.Mode=1

Now drag a Timer to your project and set its mode to OFF, and period to 3000. In the Timer’s action, do this:

s.Write “[PASSCODE]”
s.Write Chr(10)

I have an SSH class if you’d like.

If anyone would like my SSH class, it’s here. However, if it doesn’t work for you, fix it however you’d like. I’m afraid there are a lot of variables and I don’t have time to troubleshoot.

Kem, the link to DropBox is invalid. Do you have an example project for your SSH class?

Scott if you have the MBS plugin collection there is a native SSH class in their network plugins. 100% full control over the SSH v2 session FWIW.

I put the class back in my Dropbox too.

https://dl.dropboxusercontent.com/u/26920684/SSH%20Shell.zip