Looking for a library to execute unix commands on remote machine

Hi Team,

I just joined this Forum, searched for similar posts in this blog but couldn’t find so posting this question.

Can you please suggest me some GO library/example through which i can connect to remote machine with SSH conenction -> sudo to an account -> execute several commands?

My end goal is to execute multiple commands on several unix machines with different sudo users. I may have to keep the SSH conenction alive for sometime too.

Thanks in advance.


(S)FTP isn’t made for executing programs or even worse sudoing…

They are made to transfer files from one computer to another.

If you want to run programs on the other side you’ll have to use SSH or Telnet.

I am sorry, I meant SSH. Thanks for correcting me. Let me correct my question.

https://godoc.org/golang.org/x/crypto/ssh May be one alternative

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.