跨平台系统管理:从SSH到OS X脚本的全面指南
在管理多样化的 *nix 机器基础设施时,结合使用 SSH 密钥、NFS 挂载的源目录和跨平台 Python 代码是一种有效的方法。下面将详细介绍具体步骤和相关工具的使用。
管理系统的步骤
步骤 1:创建 SSH 公钥
需要在用于管理机器的系统上创建一个 SSH 公钥。不同平台的创建方式可能有所不同,可以参考操作系统文档或使用 man ssh 命令获取详细信息。以下是一个创建 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:
超级会员免费看
订阅专栏 解锁全文
206

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



