Cygwin ssh服务配置 (SecureCRT连接Cygwin配置)

1、运行ssh-host-config

这里需要注意的是标红部分,输入的用户名或密码要符合计算机的用户名或密码策略(尤其是公司有权限限制的电脑)。

$ 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/README.privsep.
*** Query: Should privilege separation be used? (yes/no) yes
*** Warning: sshd is in /etc/passwd, but the
*** Warning: local machine‘s SAM does not know about sshd.
*** Warning: Perhaps sshd is a pre-existing domain account.
*** Warning: Continuing, but check if this is ok.
*** Info: Updating /etc/sshd_config file

*** 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.

*** Warning: cyg_server is in /etc/passwd, but the local
*** Warning: machine‘s SAM does not know about cyg_server.
*** Warning: Perhaps cyg_server is a pre-existing domain account.
*** Warning: Continuing, but check if this is ok.
*** 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: The following privileged accounts were found: ‘cyg_server‘ .

*** 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: cyg_user123
*** Query: Reenter: cyg_user123

*** Query: Create new privileged user account ‘cyg_user123‘? (yes/no) yes
*** Info: Please enter a password for new user cyg_user123.  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 ‘cyg_user123‘ has been created with password ‘Tough_01‘.
*** 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 ‘cyg_user123‘ account.

*** Info: Also keep in mind that the user ‘cyg_user123‘ needs read permissions
*** Info: on all users‘ relevant files for the services running as ‘cyg_user123‘.
*** 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 ‘cyg_user123‘
*** 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!

最后一句话说明ssh服务安装成功。

2、启动 sshd服务

$ net start sshd
The CYGWIN sshd service is starting.
The CYGWIN sshd service was started successfully.

3、本地ssh连接测试

$ ssh localhost
The authenticity of host ‘localhost (::1)‘ can‘t be established.
ECDSA key fingerprint is 84:4f:13:3e:f7:55:3f:a2:d2:50:26:f5:1b:72:85:fb.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘localhost‘ (ECDSA) to the list of known hosts.
[email protected]‘s password:

4、用SecureCRT连接cygwin本机
连接地址:          127.0.0.1
连接端口:          22
用户名密码:     自己机器的用户名及密码,不是之前配置的cyg_user123

时间: 2024-10-23 00:29:41

Cygwin ssh服务配置 (SecureCRT连接Cygwin配置)的相关文章

Linux配置ssh服务和XShell连接Linux

SSH服务查看和安装,配置: https://www.cnblogs.com/qiuqiuqiu/p/6445426.html https://www.cnblogs.com/yunweis/p/7727077.html https://blog.csdn.net/java_dotar_01/article/details/76942563 注意防火墙开启的情况下需要打开SSH对应端口,默认为22. XShell配置SSH连接Linux: https://jingyan.baidu.com/ar

配置SecureCRT连接ubuntu

[步骤1]安装.crack SecureCRT 官网下载需要注册个人信息,提供一个 scrt-sfx-7.3.4-839.ubuntu13-64.x86_64.deb 百度网盘下载地址: http://pan.baidu.com/s/1qWLzgD2 crack脚本,百度网盘下载地址:http://pan.baidu.com/s/1qWmnoU4 .deb支持双击安装 crack:在终端运行 sudo perl securecrt_linux_crack.pl /usr/bin/SecureCR

SecureCRT连接Ubuntu配置

SecureCRT安装配置 Step1.Ubuntu cmd sudo apt-get update sudo apt-get install openssh-server openssh-client  // 失效? ifconfig        //查看IP netstat -tlp // 确认ssh-server正常工作 Step2. SecureCRT配置 未开启任何会话设置默认环境 参考: securecrt使用教程.SecureCRT配置详细图文教程 SecureCRT 连接 Ub

SSH服务端远程登录的配置

SSH服务的服务启动文件位置: #ls –l  /etc/init.d/sshd 查看SSH服务的进程 #ps –ef |grep sshd Ssh服务的配置文件位置 #ll /etc/ssh/sshd_config         //ssh_config是Linux客户端文件 4. 修改文件之前,先要备份文件 #cd /etc/ssh #cp sshd_config  sshd_config.cuilong.20150706 修改sshd_config文件 #vim sshd_config 

SecureCRT连接虚拟机(ubuntu)配置

使用SecureCRT连接虚拟机(ubuntu)配置记录 这种配置方法,可以非常方便的操作虚拟机里的Linux系统,且让VMware在后台运行,因为有时候我直接在虚拟机里操作会稍微卡顿,或者切换速度不理想,使用该方法亲测本机效果确实ok,特此记录. SecureCRT介绍 SecureCRT是一款支持SSH(SSH1和SSH2)的终端仿真程序,简单地说是Windows下登录UNIX或Linux服务器主机的软件,同时还支持Telnet和rlogin协议,非常好用的SSH客户端. 配置SecureC

Ubuntu 开启远程ssh服务

一.实验要求 1. 在安装好的Ubuntu 16.04 LTS 64位系统中开启远程服务 2. 并用SecureCRT 进行远程 二.步骤 1. 由于系统安装的时候并没有安装openssh 更新系统工具和依赖: sudo apt-get update 执行安装命令 sudo apt-get install openssh-server openssh-client 2. 启动ssh 先查看ssh是否在运行,执行命令sudo ps -e |grep ssh,如果没有任何显示,是没有运行ssh服务的

SSH服务及批量分发与管理实战

SSH服务 一.SSH服务介绍 SSH是Secure Shell Protocol的简写,由IETF网络工作小组制定:在进行数据传输之前,SSH先对联机数据包通过加密技术进行加密处理,加密后再进行数据传输,确保了传递的数据安全. SSH是专为远程登录会话和其他网络服务提供的安全性协议.利用SSH协议可以有效的防止远程管理过程中的信息泄露问题,在当前的生产环境当中,绝大多数企业普遍采用SSH协议服务来代替传统的不安全的远程联机服务软件.如telnet等. SSH服务功能: a.类似telnet远程

如何搭建ssh服务?

为了日后便于查询,本文所涉及到的所有命令集合如下: rpm -qa | grep openssh #查看是否安装了openssh软件 service sshd status #服务端的ssh状态 ifconfig #查看当前机器的IP vi /etc/ssh/sshd_config #进行ssh的配置 service sshd restart #重启ssh服务,使修改的配置生效 chkconfig iptables off #永久关闭防火墙 一.什么是SSH? SSH就是用来进行远程登陆的一种协

查看linux ssh服务信息及运行状态

关于ssh服务端配置有不少文章,例如 linux下ssh服务配置,这里仅列举出一些查看ssh服务相关信息的常用命令. rpm -qa | grep ssh 可以看到系统中ssh安装包 rpm -ql openssh-3.5p1-6 查看该安装包安装信息(如安装路径,配置文件等) ps -e | grep ssh 查看ssh服务有没有运行,如果有,可以看到类似以下内容: 2254 ? 00:00:00 sshd 这证明ssh已经在运行了,进程名为sshd 如果没有运行,可以通过以下命令运行之: r