 Flask入门教程for Windows 后(下一节)附带的 Git Bash。cmder 集成了 Git Bash,支持一些在 Linux 或 macOS 下才能使用的命令 (程序),比如 ls、cat、nano、ssh 等,这些命令我们在后面会用到。 使用 Git Git 是一个流行的版本控制工具,我们可以用它来记录程序源码和文件的变动情 况,或是在编程时进行多人协作,你可以把它看做一个优雅的代码变动备份工具。 账户,点击访问注册页面,根据指示完成注册流程。登录 备用。 设置 SSH 密钥 一般情况下,当推送本地改动到远程仓库时,需要输入用户名和密码。因为传输通 常是通过 SSH 加密,所以可以通过设置 SSH 密钥来省去验证账号的步骤。 首先使用下面的命令检查是否已经创建了 SSH 密钥: 第 1 章:准备工作 9 $ cat ~/.ssh/id_rsa.pub 如果显示“No such file directory”,就使用下面的命令生成 SSH 密钥对,否则复 制输出的值备用: $ ssh-keygen 一路按下 Enter 采用默认值,最后会在用户根目录创建一个 .ssh 文件夹,其中包含 两个文件,id_rsa 和 id_rsa.pub,前者是私钥,不能泄露出去,后者是公钥,用于 认证身份,就是我们要保存到 GitHub 上的密钥值。再次使用前面提到的命令获得 文件内容: $ cat ~/.ssh/id_rsa0 码力 | 127 页 | 7.62 MB | 1 年前3 Flask入门教程for Windows 后(下一节)附带的 Git Bash。cmder 集成了 Git Bash,支持一些在 Linux 或 macOS 下才能使用的命令 (程序),比如 ls、cat、nano、ssh 等,这些命令我们在后面会用到。 使用 Git Git 是一个流行的版本控制工具,我们可以用它来记录程序源码和文件的变动情 况,或是在编程时进行多人协作,你可以把它看做一个优雅的代码变动备份工具。 账户,点击访问注册页面,根据指示完成注册流程。登录 备用。 设置 SSH 密钥 一般情况下,当推送本地改动到远程仓库时,需要输入用户名和密码。因为传输通 常是通过 SSH 加密,所以可以通过设置 SSH 密钥来省去验证账号的步骤。 首先使用下面的命令检查是否已经创建了 SSH 密钥: 第 1 章:准备工作 9 $ cat ~/.ssh/id_rsa.pub 如果显示“No such file directory”,就使用下面的命令生成 SSH 密钥对,否则复 制输出的值备用: $ ssh-keygen 一路按下 Enter 采用默认值,最后会在用户根目录创建一个 .ssh 文件夹,其中包含 两个文件,id_rsa 和 id_rsa.pub,前者是私钥,不能泄露出去,后者是公钥,用于 认证身份,就是我们要保存到 GitHub 上的密钥值。再次使用前面提到的命令获得 文件内容: $ cat ~/.ssh/id_rsa0 码力 | 127 页 | 7.62 MB | 1 年前3
 03 小罗 python与devops []}}, 'dark': {‘192.168.1.200': { 'changed': False, 'msg': u'Failed to connect to the host via ssh: ssh: connect to host 1.1.1.1 port 22: Connection timed out\r\n', 'unreachable': True}}} 监控系统二次开发0 码力 | 22 页 | 1.64 MB | 1 年前3 03 小罗 python与devops []}}, 'dark': {‘192.168.1.200': { 'changed': False, 'msg': u'Failed to connect to the host via ssh: ssh: connect to host 1.1.1.1 port 22: Connection timed out\r\n', 'unreachable': True}}} 监控系统二次开发0 码力 | 22 页 | 1.64 MB | 1 年前3
 python3学习手册'__main__': loop_monitor() ★csv模块 在 ★第15章、常用非自带模块 常用的非自带模块,需要使用pip安装 ★paramiko(SSH远程登录) # pip3 install paramiko # 在pycharm里,打开工程所在目录,进入venv\Scripts\子目录下 按下Shi�键同时点击鼠标右键,在此处打开PowerShell窗口 client1 = paramiko.SSHClient() client1.set_missing_host_key_policy(paramiko.AutoAddPolic y()) # 自动添加服务器的ssh密钥,允许连接不在know_hosts文件里的 主机 try: # prikey = paramiko.RSAKey(filename=prikey_file) prikey = paramiko = "xxxxxx" port = 22 timeout = 20 # 单位:秒 transport = paramiko.Transport((hostname, port)) # 创建 SSH传输通道 try: transport.connect(username=username, password=password) except paramiko.AuthenticationException0 码力 | 213 页 | 3.53 MB | 1 年前3 python3学习手册'__main__': loop_monitor() ★csv模块 在 ★第15章、常用非自带模块 常用的非自带模块,需要使用pip安装 ★paramiko(SSH远程登录) # pip3 install paramiko # 在pycharm里,打开工程所在目录,进入venv\Scripts\子目录下 按下Shi�键同时点击鼠标右键,在此处打开PowerShell窗口 client1 = paramiko.SSHClient() client1.set_missing_host_key_policy(paramiko.AutoAddPolic y()) # 自动添加服务器的ssh密钥,允许连接不在know_hosts文件里的 主机 try: # prikey = paramiko.RSAKey(filename=prikey_file) prikey = paramiko = "xxxxxx" port = 22 timeout = 20 # 单位:秒 transport = paramiko.Transport((hostname, port)) # 创建 SSH传输通道 try: transport.connect(username=username, password=password) except paramiko.AuthenticationException0 码力 | 213 页 | 3.53 MB | 1 年前3
 PyWebIO v1.3.3 Documentationaccess service, the following configurations are currently supported: – ssh_key_path: Use a custom ssh key, the default key path is ~/.ssh/id_xxx. Note that only rsa and ed25519 keys are supported. – custom_domain:0 码力 | 100 页 | 1.34 MB | 1 年前3 PyWebIO v1.3.3 Documentationaccess service, the following configurations are currently supported: – ssh_key_path: Use a custom ssh key, the default key path is ~/.ssh/id_xxx. Note that only rsa and ed25519 keys are supported. – custom_domain:0 码力 | 100 页 | 1.34 MB | 1 年前3
 PyWebIO v1.3.1 Documentationaccess service, the following configurations are currently supported: – ssh_key_path: Use a custom ssh key, the default key path is ~/.ssh/id_xxx. Note that only rsa and ed25519 keys are supported. – custom_domain:0 码力 | 100 页 | 1.34 MB | 1 年前3 PyWebIO v1.3.1 Documentationaccess service, the following configurations are currently supported: – ssh_key_path: Use a custom ssh key, the default key path is ~/.ssh/id_xxx. Note that only rsa and ed25519 keys are supported. – custom_domain:0 码力 | 100 页 | 1.34 MB | 1 年前3
 PyWebIO v1.3.0 Documentationaccess service, the following configurations are currently supported: – ssh_key_path: Use a custom ssh key, the default key path is ~/.ssh/id_xxx. Note that only rsa and ed25519 keys are supported. – custom_domain:0 码力 | 100 页 | 1.34 MB | 1 年前3 PyWebIO v1.3.0 Documentationaccess service, the following configurations are currently supported: – ssh_key_path: Use a custom ssh key, the default key path is ~/.ssh/id_xxx. Note that only rsa and ed25519 keys are supported. – custom_domain:0 码力 | 100 页 | 1.34 MB | 1 年前3
 PyWebIO v1.3.2 Documentationaccess service, the following configurations are currently supported: – ssh_key_path: Use a custom ssh key, the default key path is ~/.ssh/id_xxx. Note that only rsa and ed25519 keys are supported. – custom_domain:0 码力 | 100 页 | 1.34 MB | 1 年前3 PyWebIO v1.3.2 Documentationaccess service, the following configurations are currently supported: – ssh_key_path: Use a custom ssh key, the default key path is ~/.ssh/id_xxx. Note that only rsa and ed25519 keys are supported. – custom_domain:0 码力 | 100 页 | 1.34 MB | 1 年前3
 PyWebIO v1.3.1 使用手册入可以很方便地将应用临时分享给其他人来体验。目前远程接入功能由 localhost.run 提供,你可以传入一个 dict 来配置远程接入服务,目前支持以下配置: – ssh_key_path: 自定义 ssh 密钥的路径, 默认使用 ~/.ssh/id_xxx. 注意目前仅 支持 rsa 和 ed25519 类型的密钥。 – custom_domain: 使用自定义域名。这项功能需要 localhost0 码力 | 111 页 | 1.70 MB | 1 年前3 PyWebIO v1.3.1 使用手册入可以很方便地将应用临时分享给其他人来体验。目前远程接入功能由 localhost.run 提供,你可以传入一个 dict 来配置远程接入服务,目前支持以下配置: – ssh_key_path: 自定义 ssh 密钥的路径, 默认使用 ~/.ssh/id_xxx. 注意目前仅 支持 rsa 和 ed25519 类型的密钥。 – custom_domain: 使用自定义域名。这项功能需要 localhost0 码力 | 111 页 | 1.70 MB | 1 年前3
 PyWebIO v1.3.3 使用手册入可以很方便地将应用临时分享给其他人来体验。目前远程接入功能由 localhost.run 提供,你可以传入一个 dict 来配置远程接入服务,目前支持以下配置: – ssh_key_path: 自定义 ssh 密钥的路径, 默认使用 ~/.ssh/id_xxx. 注意目前仅 支持 rsa 和 ed25519 类型的密钥。 – custom_domain: 使用自定义域名。这项功能需要 localhost0 码力 | 111 页 | 1.70 MB | 1 年前3 PyWebIO v1.3.3 使用手册入可以很方便地将应用临时分享给其他人来体验。目前远程接入功能由 localhost.run 提供,你可以传入一个 dict 来配置远程接入服务,目前支持以下配置: – ssh_key_path: 自定义 ssh 密钥的路径, 默认使用 ~/.ssh/id_xxx. 注意目前仅 支持 rsa 和 ed25519 类型的密钥。 – custom_domain: 使用自定义域名。这项功能需要 localhost0 码力 | 111 页 | 1.70 MB | 1 年前3
 PyWebIO v1.3.2 使用手册入可以很方便地将应用临时分享给其他人来体验。目前远程接入功能由 localhost.run 提供,你可以传入一个 dict 来配置远程接入服务,目前支持以下配置: – ssh_key_path: 自定义 ssh 密钥的路径, 默认使用 ~/.ssh/id_xxx. 注意目前仅 支持 rsa 和 ed25519 类型的密钥。 – custom_domain: 使用自定义域名。这项功能需要 localhost0 码力 | 111 页 | 1.70 MB | 1 年前3 PyWebIO v1.3.2 使用手册入可以很方便地将应用临时分享给其他人来体验。目前远程接入功能由 localhost.run 提供,你可以传入一个 dict 来配置远程接入服务,目前支持以下配置: – ssh_key_path: 自定义 ssh 密钥的路径, 默认使用 ~/.ssh/id_xxx. 注意目前仅 支持 rsa 和 ed25519 类型的密钥。 – custom_domain: 使用自定义域名。这项功能需要 localhost0 码力 | 111 页 | 1.70 MB | 1 年前3
共 159 条
- 1
- 2
- 3
- 4
- 5
- 6
- 16














 
 