What is the proper way to do something like this:
diff <( ssh -t myuser@hosta 'sudo httpd -M') <(httpd -M)
When I want to compare the output of the 2 commands, the first on a remote host the second local?
Is this the proper method?
first you have to set public key base authentication in between both server. how you can set both server public key base auth:
first generate ssh key:
then set that key for authenticate remote server:
after done all this check that public key is working proper or not :
if no password promt for login, i mean without password if you can login then ssh key is working proper.
now use your command local server :
Now your command will show you proper output ...