1821187 Members
3200 Online
109631 Solutions
New Discussion юеВ

Re: Using SSH protocol

 
Krishnakumar M
Occasional Contributor

Using SSH protocol

Is there any equivalent to 'rcmd' system call when we are using the SSH protocol for secure communication.
What I am asking is that, is there a system call and not any command line option to use the secure protocol SSH.
4 REPLIES 4
Mark Fenton
Esteemed Contributor

Re: Using SSH protocol

Well, in theory, anything that you could do with the old r-commands you can do with ssh, but I don't know that there's a system call out there that'd hook in nicely -- you might be better off posting this question over at one of the ssh developer sites.
Karsten_1
New Member

Re: Using SSH protocol

ssh2 does.

Just append the remote command after the ssh command. (man ssh for openssh 2.9.something)

eg: ssh2 user@host ls
Karsten_1
New Member

Re: Using SSH protocol

My apologies for the previous answer.

If thought things through and if i were really desperate enough i guess i would try to hack together a library using the openssh program.
Take the ssh program and rename main() to rcmd(params here). compile it as a library and use that.
However i doubt that's what you have in mind so indeed contacting ssh might not be a bad idea.

wsll
clueless Karsten
marko asplund
Frequent Advisor

Re: Using SSH protocol

what is it exactly that you're trying accomplish? if you just need to initiate running a remote command from your program you could try running the remote ssh command using the exec() call. you would probably want to use RSA/DSA authentication.

if you are willing program in Perl, you could also check out the Net-SSH-Perl Perl module from CPAN.