配置ssh-host-config:
LONMID@LONMID-PC ~
$ ssh-host-config
*** Query: Overwrite existing /etc/ssh_config file? (yes/no)
yes
*** Info: Creating default /etc/ssh_config file
*** Query: Overwrite existing /etc/sshd_config file? (yes/no) yes
*** Info: Creating default /etc/sshd_config file
*** Info: Privilege separation is set to yes by default since OpenSSH 3.3.
*** Info: However, this requires a non-privileged account called 'sshd'.
*** Info: For more info on privilege separation read /usr/share/doc/openssh/READ
ME.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Info: Note that creating a new user requires that the current account have(管理员身份运行Cygwin bat)
*** Info: Administrator privileges.
Should this script attempt to create a
*** Query: new local account 'sshd'? (yes/no) yes
*** Info: Updating /etc/sshd_config file
*** Warning: The following functions require administrator privileges!
*** Query: Do you want to install sshd as a service?
*** Query: (Say "no" if it is already installed as a service) (yes/no) yes
*** Query: Enter the value of CYGWIN for the daemon: [](我不填,直接回车)
*** Info: On Windows Server 2003, Windows Vista, and above, the
*** Info: SYSTEM account cannot setuid to other users -- a capability
*** Info: sshd requires. You need to have or to create a privileged
*** Info: account. This script will help you do so.
*** Info: You appear to be running Windows XP 64bit, Windows 2003 Server,
*** Info: or later. On these systems, it's not possible to use the LocalSystem
*** Info: account for services that can change the user id without an
*** Info: explicit password (such as passwordless logins [e.g. public key
*** Info: authentication] via sshd).
*** Info: If you want to enable that functionality, it's required to create
*** Info: a new account with special privileges (unless a similar account
*** Info: already exists). This account is then used to run these special
*** Info: servers.
*** Info: Note that creating a new user requires that the current account
*** Info: have Administrator privileges itself.
*** Info: No privileged account could be found.
*** Info: This script plans to use 'cyg_server'.
*** Info: 'cyg_server' will only be used by registered services.
*** Query: Do you want to use a different name? (yes/no) yes
*** Query: Enter the new user name: macrotea
*** Query: Reenter: macrotea
*** Query: Create new privileged user account 'macrotea'? (yes/no) yes
*** Info: Please enter a password for new user macrotea. Please be sure
*** Info: that this password matches the password rules given on your system.
*** Info: Entering no password will exit the configuration.
*** Query: Please enter the password:
*** Query: Reenter:
*** Info: User 'macrotea' has been created with password 'asdf'.
*** Info: If you change the password, please remember also to change the
*** Info: password for the installed services which use (or will soon use)
*** Info: the 'macrotea' account.
*** Info: Also keep in mind that the user 'macrotea' needs read permissions
*** Info: on all users' relevant files for the services running as 'macrotea'.
*** Info: In particular, for the sshd server all users' .ssh/authorized_keys
*** Info: files must have appropriate permissions to allow public key
*** Info: authentication. (Re-)running ssh-user-config for each user will set
*** Info: these permissions correctly. [Similar restrictions apply, for
*** Info: instance, for .rhosts files if the rshd server is running, etc].
*** Info: The sshd service has been installed under the 'macrotea'
*** Info: account. To start the service now, call `net start sshd' or
*** Info: `cygrunsrv -S sshd'. Otherwise, it will start automatically
*** Info: after the next reboot.
*** Info: Host configuration finished. Have fun!
LONMID@LONMID-PC ~
$
分享到:
相关推荐
接着,在`config/services.php`文件中添加一个新的配置项,用于存放SSH连接信息: ```php 'ssh-tunnel' => [ 'host' => env('SSH_TUNNEL_HOST'), 'port' => env('SSH_TUNNEL_PORT'), 'username' => env('SSH_...
然后,我们需要配置 ssh-host-config,包括设置 ssh-host-config -y 和启动 OpenSSH 服务。 最后,我们需要重新启动电脑,进入普通用户界面,并打开 Cygwin 控制台。在 Cygwin 控制台中,我们可以使用 ssh 命令连接...
在本例中,提到的“ssh-config.txt”是一个SSH配置文件。SSH配置文件可以用来保存特定的连接设置,以便用户在使用SSH客户端进行远程登录时,可以不必每次都输入完整的连接信息,从而简化操作流程。配置文件通常位于...
1. **语法高亮**:`ssh-config-mode-el`为`~/.ssh/config`文件中的关键字提供颜色高亮,如`Host`、`User`、`IdentityFile`等,使得代码更易于阅读。 2. **自动补全**:在编辑过程中,该模式提供自动补全功能,可以...
在服务器端,我们需要配置 SSH 服务器的配置文件 `/etc/ssh/sshd_config`。在这个文件中,我们可以设置各种参数,例如: * `Protocol 2`:设置协议版本为 2。 * `Port 22`:设置 SSH 服务器监听的端口号。 * `...
ansible-ssh-config 该模块已迁移到改用社区版本。 Ansible的模块,用于配置ssh配置文件。 为什么? 我们有几个库可以在工作中的项目之间共享功能。 这些库位于GitHub上,它们位于自己的存储库中。 我们的部署...
SSH 的配置都集中在 `/etc/ssh/ssh_config` 文件中。可以使用文本编辑器(如 vi)编辑该文件,添加或改变以下参数: `Host *` `ForwardAgent no` `ForwardX11 no` `RhostsAuthentication no` `...
3,修改配置:修改/etc/ssh/sshd_config第32行PermitRootLogin prohibit-password为PermitRootLogin yes;修改UsePAM no为UsePAM yes;改回/etc/pam.d/sshd配置文件:cp /etc/pam.d/sshd_bak /etc/pam.d/sshd 4,重启...
var // see https://github.com/mscdex/ssh2 config = { host : 'localhost' , username : 'root' , password : 'root' } , command = 'ls -alh' ;exec ( config , command , function ( error , response &#...
检查远程主机的`/etc/ssh/sshd_config`文件,确保包含以下行: ``` PubkeyAuthentication yes AuthorizedKeysFile .ssh/authorized_keys ``` 3. **多用户共享密钥** 如果多个用户需要使用同一套密钥对登录,...
Include ~/.ssh/config-* 如果使用AWS,请确保已配置您的AWS凭证 参见 如果使用DigitalOcean,请确保设置了$DIGITAL_OCEAN_TOKEN 参见 为所有AWS实例生成ssh配置 使用当前的AWS区域( AWS_DEFAULT_REGION ),并...
SSH-配置:一个工具,用于管理的ssh配置文件 概述 每次主机更改时更新您的 .ssh/config 文件并没有那么麻烦,但是当它开始频繁发生时,即使是这种麻烦也开始增加。 这是我写来帮助处理这些问题的快速工具。 非常小心...
配置文件“/etc/ssh/ssh_config”是 OpenSSH 系统范围的配置文件,允许你通过设置不同的选项来改变客户端程序的运行方式。这个文件的每一行包含“关键词-值”的匹配,其中“关键词”是忽略大小写的。 以下是重要的...
client = MongoClient('mongodb://mongodb_host:27017/', ssh_tunnel=ssh_config) db = client['database_name'] collection = db['collection_name'] ``` 在这个例子中,`ssh_tunnel`参数接收一个包含SSH连接信息...
然后,创建或编辑`~/.ssh/config`文件,配置连接信息,包括目标服务器的主机名、用户名和端口号。例如: ```ini Host example HostName server.example.com User yourusername Port 22 ``` 这里的"example"是你...
- 编辑 `/etc/ssh/sshd_config` 文件(对于Debian/Ubuntu系统)或 `/etc/ssh/sshd_config`(对于Red Hat/CentOS系统)来配置SSH服务端。 - 常见配置项包括: - `Port`: 指定SSH服务监听的端口,默认为22。 - `...
创建一个Kubernetes服务/部署/ ConfigMap,以将SSH隧道作为Kubernetes服务。 用于带有Kubernetes的开发环境。 例子: 跑步: $ ssh-client.py 3306:internal-mysql.example....
安装完成后,主要的配置文件位于`/etc/ssh/sshd_config`。你可以使用文本编辑器,如`vi`,来编辑这个文件,根据实际需求调整设置。例如,修改`/etc/ssh/sshd_config`以改变默认行为。 3. 重启SSH服务: 修改配置...
用法# Assuming the following config fileHost server1 HostName server1.jeremyskinner.co.uk IdentityFile ~/.ssh/id_rsa var config = SshConfig . ParseConfig ( " path/to/ssh/config " );// Find a hostvar ...
- 配置文件通常位于用户家目录下的 `.ssh/config` 文件中,例如: ```ini Host host ControlPath ~/.ssh/master-%r@%h:%p ControlMaster no ``` - `ControlPath` 指定控制通道的路径。 - `ControlMaster` ...