[email protected] nc /...">

当前位置:网站首页>NC basic usage 3

NC basic usage 3

2022-04-23 20:05:00 franket

The encrypted

mcrypt Is a simple encryption software , Combined with its pipeline function, encrypted transmission can be realized

[[email protected] nc]# echo ooooooooo > file.txt 
[[email protected] nc]# mcrypt --flush --bare -F -q -m ecb < file.txt    | nc -l 4567
Enter the passphrase (maximum of 512 characters)
Please use a combination of upper and lower case letters and numbers.
Enter passphrase: 
Enter passphrase:
----------
[[email protected] nc]# nc h102 4567 | mcrypt  --flush --bare -F -q -d -m ecb > f.txt 
Enter passphrase: 
[[email protected] nc]# cat f.txt 
ooooooooo
[[email protected] nc]# 

Remote cloning

Using this method, batch deployment can be realized

[[email protected] nc]# df -h 
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/vg_temp-lv_root
                       50G   22G   25G  47% /
tmpfs                 935M     0  935M   0% /dev/shm
/dev/sda1             477M   34M  419M   8% /boot
/dev/mapper/vg_temp-lv_home
                      5.4G   12M  5.1G   1% /home
[[email protected] nc]# dd if=/dev/sda1  | nc -l 5678
1024000+0 records in
1024000+0 records out
524288000 bytes (524 MB) copied, 403.753 s, 1.3 MB/s
[[email protected] nc]#
----------
[[email protected] nc]# nc h102 5678 | dd of=h102.boot.backup
1022488+2911 records in
1024000+0 records out
524288000 bytes (524 MB) copied, 340.562 s, 1.5 MB/s
[[email protected] nc]# du -sh h102.boot.backup 
501M	h102.boot.backup
[[email protected] nc]# 

Tip: The following methods can be used to view the contents

版权声明
本文为[franket]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204231947044759.html