View Full Version : SSH from WebMethod to another server
Is there a way in webmethod through which we can SSH to another server and get data from that server. Any input with regard to this will be highly appreciated.
ssh is just a command line application. You need an IS service that invoke this OS level command: <code>"ssh user@server command"</code>
I think the shareware section or the archives has a link to a service to invoke an OS command.
Your remote server has IS on it?. If so you can create a packge to list the files on a specified directory, get the files, delete the files. Do a remote invoke on these services to do your work, this will work even your server inside DMZ and has one way port.
Other wise you have to use the service which will execute the OS command.
HTH
No, the remote server does not have IS on it. Can you explain more in detail how can OS level commnad can be executed from a remote IS ? Is there any reffennce matterial that you can direct me for OS level execution.
Thanks for your input. I will work on this and will keep you update about the matter. Appreciate it.
briangutman
08-12-2003, 22:53
set up your ssh keys to allow you to ssh without being prompted for a password.
Then using the code above pass it the following command:
`ssh remote_server "sqlplus user/pass@SID @someQuery.sql"`
This will pull back the result set of the sql quesry inside someQuery.sql.
Or you could do something like this to start up apache:
`ssh remote_server "/usr/local/apache/bin/apachectl start"`
ricksite
04-26-2004, 12:58
Hi,
I have to use SSH to do an FTP to a server that it's outside our organizartion,
anybody has tried this?
some guidelines?
thanx in advanced