Thursday, May 2, 2024
10
rated 0 times [  10] [ 0]  / answers: 1 / hits: 10488  / 3 Years ago, wed, august 4, 2021, 6:39:41

I know that its possible to chat in linux terminal using netcat. I want to know whether it is possible to encrypt the netcat communications.



I did chat by listening on PC-1



nc -l 1234


And connecting to my IP on the other machine.



nc $IP 1234

More From » command-line

 Answers
7

It's possible - however I don't think nc does this itself: echo "Words" | gpg -e will produce an encrypted version on stdout; you can specify a receiving user as per usual.

If you pipe this to another copy of gpg as gpg -d then it asks for a passphrase - this will be remembered for a period, so enabling a conversation.



Therefore, echo "words" | gpg -e | nc target 4321 will send, and nc -l 4321 | gpg -d will listen.



Also, see this question which is similar.


[#20982] Thursday, August 5, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
rmiend

Total Points: 292
Total Questions: 101
Total Answers: 111

Location: Azerbaijan
Member since Tue, Aug 9, 2022
2 Years ago
;