mcrypt 是一个简单的加密软件,结合它的管道功能可以实现加密传输
[root@h102 nc]# echo ooooooooo > file.txt
[root@h102 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:
----------
[root@h101 nc]# nc h102 4567 | mcrypt --flush --bare -F -q -d -m ecb > f.txt
Enter passphrase:
[root@h101 nc]# cat f.txt
ooooooooo
[root@h101 nc]#
使用这个方法可以实现批量部署
[root@h102 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
[root@h102 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
[root@h102 nc]#
----------
[root@h101 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
[root@h101 nc]# du -sh h102.boot.backup
501M h102.boot.backup
[root@h101 nc]#
Tip: 使用下面方法可以查看其中的内容
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
本文系转载,前往查看
如有侵权,请联系 cloudcommunity@tencent.com 删除。
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有