-1

Assume I want to exchange a hash value between two machines for some purpose, how do I prevent Man-in-middle from capturing it without encrypting the hash value itself?

  • Digitally sign it – Stephane Mar 29 '17 at 16:04
  • 1
    @Stephane: sign is to prevent modification. To prevent interception you need encryption... – Serge Ballesta Mar 29 '17 at 16:19
  • The good old way: write it on a removable media on one side. Use plane, trains, boats, horses, bicycles or simply your feet to ge to the other machine and use it there. – Serge Ballesta Mar 29 '17 at 16:21
  • More seriously what answer do you expect? Only encryption be it payload itself or through an encrypted channel can prevent MITM attack... – Serge Ballesta Mar 29 '17 at 16:23
1

You can create an ssh tunnel between the two participating machines and can send the unencrypted data.

Say you are using linux.

1) First create a ssh server on the machine receiving the data you can use openssh to create it.Install openssh-server and then add port to listen in /etc/ssh/sshd_config

sudo apt-get install openssh-server

2) Now after the server is created you can access it from other machine using ssh clients available like putty or ssh command line.

ssh username@ip -p port

3) Now you can copy file using scp.

scp -P port file username@ip:new_file

| improve this answer | |
  • This answer is really short. Can you expand it at all by giving more details? – Mike Ounsworth Mar 29 '17 at 19:46

Not the answer you're looking for? Browse other questions tagged or ask your own question.