使用SSH密钥、NFS挂载源目录和跨平台Python管理系统
在管理多样化的 *nix 机器基础设施时,结合使用 SSH 密钥、共享的 NFS 挂载源目录以及跨平台的 Python 代码是一种有效的方法。以下将详细介绍具体步骤。
1. 管理系统的准备步骤
1.1 创建公共 SSH 密钥
在用于管理机器的系统上创建公共 SSH 密钥。不同平台的创建方式可能有所不同,可查阅操作系统文档或使用 man ssh 命令获取详细信息。示例代码如下:
[ngift@Macintosh-6][H:11026][J:0]% ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
6c:2f:6e:f6:b7:b8:4d:17:05:99:67:26:1c:b9:74:11 root@localhost.localdomain
[ngift@Macintosh-6][H:11026][J:0]%
<
超级会员免费看
订阅专栏 解锁全文
1791

被折叠的 条评论
为什么被折叠?



