使用如下终端命令可以在 Linux 主机中安装 ssh服务器sudo apt-get install openssh-server

lin@lin-machine:~$ sudo apt-get install openssh-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libck-connector0 ncurses-term openssh-client openssh-sftp-server
ssh-import-id
Suggested packages:
libpam-ssh keychain monkeysphere rssh molly-guard
The following NEW packages will be installed:
libck-connector0 ncurses-term openssh-server openssh-sftp-server
ssh-import-id
The following packages will be upgraded:
openssh-client
upgraded, newly installed, to remove and not upgraded.
Need to get , kB of archives.
After this operation, , kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get: http://cn.archive.ubuntu.com/ubuntu/ trusty/main libck-connector0 amd64 0.4.5-3.1ubuntu2 [10.5 kB]
Get: http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main openssh-client amd64 1:6.6p1-2ubuntu2.11 [564 kB]
Get: http://cn.archive.ubuntu.com/ubuntu/ trusty/main ncurses-term all 5.9+20140118-1ubuntu1 [243 kB]
Get: http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main openssh-sftp-server amd64 1:6.6p1-2ubuntu2.11 [34.1 kB]
Get: http://cn.archive.ubuntu.com/ubuntu/ trusty-updates/main openssh-server amd64 1:6.6p1-2ubuntu2.11 [318 kB]
Get: http://cn.archive.ubuntu.com/ubuntu/ trusty/main ssh-import-id all 3.21-0ubuntu1 [9,624 B]
Fetched , kB in 22s (51.6 kB/s)
Preconfiguring packages ...
Selecting previously unselected package libck-connector0:amd64.
(Reading database ... files and directories currently installed.)
Preparing to unpack .../libck-connector0_0.4.5-.1ubuntu2_amd64.deb ...
Unpacking libck-connector0:amd64 (0.4.-.1ubuntu2) ...
Preparing to unpack .../openssh-client_1%3a6.6p1-2ubuntu2.11_amd64.deb ...
Unpacking openssh-client (:.6p1-2ubuntu2.) over (:.6p1-2ubuntu2.) ...
Selecting previously unselected package ncurses-term.
Preparing to unpack .../ncurses-term_5.+-1ubuntu1_all.deb ...
Unpacking ncurses-term (5.9+-1ubuntu1) ...
Selecting previously unselected package openssh-sftp-server.
Preparing to unpack .../openssh-sftp-server_1%3a6.6p1-2ubuntu2.11_amd64.deb ...
Unpacking openssh-sftp-server (:.6p1-2ubuntu2.) ...
Selecting previously unselected package openssh-server.
Preparing to unpack .../openssh-server_1%3a6.6p1-2ubuntu2.11_amd64.deb ...
Unpacking openssh-server (:.6p1-2ubuntu2.) ...
Selecting previously unselected package ssh-import-id.
Preparing to unpack .../ssh-import-id_3.-0ubuntu1_all.deb ...
Unpacking ssh-import-id (3.21-0ubuntu1) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.-) ...
ureadahead will be reprofiled on next reboot
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Setting up libck-connector0:amd64 (0.4.-.1ubuntu2) ...
Setting up openssh-client (:.6p1-2ubuntu2.) ...
Setting up ncurses-term (5.9+-1ubuntu1) ...
Setting up openssh-sftp-server (:.6p1-2ubuntu2.) ...
Setting up openssh-server (:.6p1-2ubuntu2.) ...
Creating SSH2 RSA key; this may take some time ...
Creating SSH2 DSA key; this may take some time ...
Creating SSH2 ECDSA key; this may take some time ...
Creating SSH2 ED25519 key; this may take some time ...
ssh start/running, process
Setting up ssh-import-id (3.21-0ubuntu1) ...
Processing triggers for libc-bin (2.19-0ubuntu6.) ...
Processing triggers for ureadahead (0.100.-) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...

查看当前的虚拟机的ip地址

lin@lin-machine:~$ ifconfig
eth0 Link encap:Ethernet HWaddr :0c::f1:a1:
inet addr:192.168.147.136 Bcast:192.168.147.255 Mask:255.255.255.0
inet6 addr: fe80::20c:29ff:fef1:a137/ Scope:Link
UP BROADCAST RUNNING MULTICAST MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (1.4 MB) TX bytes: (63.3 KB) lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::/ Scope:Host
UP LOOPBACK RUNNING MTU: Metric:
RX packets: errors: dropped: overruns: frame:
TX packets: errors: dropped: overruns: carrier:
collisions: txqueuelen:
RX bytes: (13.3 KB) TX bytes: (13.3 KB)

在PC上查看ip地址

Microsoft Windows [版本 6.1.]
版权所有 (c) Microsoft Corporation。保留所有权利。 E:\Users\libra>ipconfig Windows IP 配置 ... 以太网适配器 VMware Network Adapter VMnet8: 连接特定的 DNS 后缀 . . . . . . . :
本地链接 IPv6 地址. . . . . . . . : fe80:::b9f5:ddaf:%
IPv4 地址 . . . . . . . . . . . . : 192.168.147.1
子网掩码 . . . . . . . . . . . . : 255.255.255.0
默认网关. . . . . . . . . . . . . : ... E:\Users\libra>

【备注】pc和linux虚拟机在同个网段的

测试他们是否可以ping

lin@lin-machine:~$ ping 192.168.147.1
PING 192.168.147.1 (192.168.147.1) () bytes of data.
bytes from 192.168.147.1: icmp_seq= ttl= time=0.586 ms
bytes from 192.168.147.1: icmp_seq= ttl= time=0.442 ms
bytes from 192.168.147.1: icmp_seq= ttl= time=0.435 ms
^C
--- 192.168.147.1 ping statistics ---
packets transmitted, received, % packet loss, time 1999ms
rtt min/avg/max/mdev = 0.435/0.487/0.586/0.074 ms

【可能存在一些异常的原因】注意: Windows 7 默认打开了系统防火墙,是禁ping的,如果在Linux下ping Windows
7,需要先关闭Windows 7 的防火墙。

没有问题后我们在SecureCRT上开始测试

【备注】根据自己的情况来写IP和主机名

来测试一下

ssh服务器配置的更多相关文章

  1. windows本地自动集成代码+SSH服务器配置

    在windows环境下使用Jenkins自动集成代码 描述: 局域网电脑A是本地服务器,安全win7系统,安装了Jenkins:现在想让A成为测试服务器,需要隔一段时间从SVN里同步出最新的代码,供客 ...

  2. Linux ssh服务器配置

    配置文件在/etc/sshd_config,注意只有root可rw,其他所有用户权限为---. 配置说明可参考man sshd_config. 如果更改了服务器端口号,并且启用了SELinux,需要执 ...

  3. SSH配置私钥登陆服务器

    前言 本文基于实际Linux管理工作,实例讲解工作中使用ssh证书登录的实际流程,讲解ssh证书登录的配置原理,基于配置原理,解决实际工作中,windows下使用SecureCRT证书登录的各种问题, ...

  4. 使用 fail2ban 防御 SSH 服务器的暴力破解攻击

    对于SSH服务的常见的攻击就是暴力破解攻击——远程攻击者通过不同的密码来无限次地进行登录尝试.当然SSH可以设置使用非密码验证验证方式来对抗这种攻击,例如公钥验证或者双重验证.将不同的验证方法的优劣处 ...

  5. ssh证书登录(实例详解)

      前言 本文基于实际Linux管理工作,实例讲解工作中使用ssh证书登录的实际流程,讲解ssh证书登录的配置原理,基于配置原理,解决实际工作中,windows下使用SecureCRT证书登录的各种问 ...

  6. Kali 配置ssh服务器

    SSH服务器配置 ssh是大多数Linux大佬必备的一样东西.Linux在工作中通常是命令行界面为主,那么就必定会使用ssh进行远程登录.下面我们介绍ssh配置和使用. 操作系统:kali-linux ...

  7. ssh证书登录

    前言 本文基于实际Linux管理工作,实例讲解工作中使用ssh证书登录的实际流程,讲解ssh证书登录的配置原理,基于配置原理,解决实际工作中,windows下使用SecureCRT证书登录的各种问题, ...

  8. [转载]ssh证书登录

    转载链接 前言 本文基于实际Linux管理工作,实例讲解工作中使用ssh证书登录的实际流程,讲解ssh证书登录的配置原理,基于配置原理,解决实际工作中,windows下使用SecureCRT证书登录的 ...

  9. 安全通信协议SSH应用与分析

    一.实验简介: 本次实验属于安全协议应用与分析系列 二 实验环境: Windows server 2003 server windows xp 做client 三.实验目的 通过该实验了解SSH服务器 ...

随机推荐

  1. RabbitMQ 的安装----windows环境

    一.RabbitMQ在windows下的安装 RabbitMQ 它依赖于Erlang,在window上安装时,需要先安装Erlang. 首先确定你的window电脑是32位还是64位,然后下载对应版本 ...

  2. Java语法基础学习DayEighteen(常用类)

    一.String类 1.特点 String代表不可变的字符序列,底层用char[]存放. String是final的. 2.内存解析 3.常用方法 int length() char charAt(i ...

  3. Python中异常处理

    高级语言通常都配置了一套try...except...finally的错误处理机制. 1.我们先看一个try的机制 try: res=1/0except ZeroDivisionError as e: ...

  4. [Go back to REDIS]

    Overview 内存中的数据结构存储系统,可以用作数据库.缓存和消息中间件. redis底层数据结构:跳跃表 [为什么选skiplist而不是red-black tree] 支持多种数据结构:Str ...

  5. Centos yum 命令行 安装KDE Desktop

    1:修改yum源为本地源 (见相关随笔:centos 配置本地yum源) 2:# yum groupinstall "X Window System" ← 安装基本的X系统组件# ...

  6. Dubbo透传traceId/logid的一种思路

    前言: 随着dubbo的开源, 以及成为apache顶级项目. dubbo越来越受到国内java developer欢迎, 甚至成为服务化自治的首选方案. 随着微服务的流行, 如何跟踪整个调用链, 成 ...

  7. (27)session(设置值、取值、修改、删除)

    session的由来 Cookie虽然在一定程度上解决了“保持状态”的需求,但是由于Cookie本身最大支持4096字节,以及Cookie本身保存在客户端,可能被拦截或窃取,因此就需要有一种新的东西, ...

  8. 664. Strange Printer

    class Solution { public: int dp[100][100]; int dfs(const string &s, int i,int j) { if(i>j)ret ...

  9. PythonStudy——字符串扩展方法 String extension method

    ')) ')) print('***000123123***'.lstrip('*')) print('***000123123***'.rstrip('*')) print('华丽分割线'.cent ...

  10. 公式推导:【BACF】

    [BACF]: Kiani Galoogahi H, Fagg A, Lucey S. Learning Background-Aware Correlation Filters for Visual ...