Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save govind0229/30cf0aba9fbe11c87475a006d883b517 to your computer and use it in GitHub Desktop.
Save govind0229/30cf0aba9fbe11c87475a006d883b517 to your computer and use it in GitHub Desktop.
The check file differs from the remote server using ssh commands.

Compare remote server file using ssh commands

# ssh user@remote-host "cat /home/root/file_remote" | diff  - file_local 

# ssh -P<port> -l root <remote server ip> "cat  /home/root/file_remote" | diff - /home/root/local_server_file
enter password 
	> 
		diff will
	<
	
	#

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment