VPS
圈内最新资讯与活动分享

Windows 使用 CMD 连接 SSH(密码登录)

OpenSSH(Open Secure Shell)是一个用于安全远程登录和其他网络服务的开源工具套件。
从 Windows 10 版本 1809 和 Windows Server 2019 开始,Windows 系统正式支持 OpenSSH 客户端和服务器功能。

打开命令提示符

Win + R 打开运行对话框,输入 cmd 然后按 Enter。

运行 SSH 命令

在命令提示符中输入以下命令
ssh username@hostname -p 22

  • username SSH 用户名
  • hostname 服务器的 IP 或域名
  • -p SSH端口,如果端口是22 可以不输入
  • 例如:

    ssh root@192.168.1.99

    接受服务器密钥(首次连接时)输入yes
    The authenticity of host '192.168.1.99 (192.168.1.99)' can't be established.
    ECDSA key fingerprint is SHA256:... (fingerprint).
    Are you sure you want to continue connecting (yes/no)? yes

    输入密码
    root@192.168.1.99's password:

    成功连接到服务器后,会看到远程服务器的命令提示符。

    Windows 使用 CMD 连接 SSH

    Windows 使用 CMD 连接 SSH


    使用批处理文件

    @echo off
    ssh root@192.168.1.99
    pause

    保存为 .bat 文件,打开自动连接。解放双手,不用频繁输入。

    赞(0)
    未经允许不得转载:主机圈 » Windows 使用 CMD 连接 SSH(密码登录)
    分享短链

    主机圈

    VPS圈内最新资讯与活动分享