温馨提示×

debian怎样配置securecrt

小樊
53
2026-09-10 18:06:26
栏目: 智能运维

下面按“在 Debian 上让 SecureCRT 能连进来 / 用起来”的常见场景来说明。SecureCRT 本身是 Windows / macOS / Linux 客户端,Debian 一般作为被连接的服务端(SSH 服务器),或你在 Debian 上安装 SecureCRT 客户端。


一、Debian 作为 SSH 服务端(最常见)

1. 安装并启动 SSH 服务

sudo apt update
sudo apt install openssh-server
sudo systemctl enable --now ssh

检查状态:

systemctl status ssh

2. 配置 SSH(可选但推荐)

编辑配置文件:

sudo nano /etc/ssh/sshd_config

常见安全配置:

Port 22
PermitRootLogin no
PasswordAuthentication yes   # 或 no(用密钥)
PubkeyAuthentication yes

修改后重启:

sudo systemctl restart ssh

3. 防火墙放行

sudo ufw allow 22

4. SecureCRT 连接 Debian

在 SecureCRT 中:

  • Protocol:SSH2
  • Hostname:Debian IP
  • Port:22
  • Username:你的 Debian 用户名
  • 认证方式:
    • 密码
    • 或公钥(推荐)

二、使用密钥登录(推荐)

Debian 端

ssh-keygen
cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
chmod 600 ~/.ssh/authorized_keys

SecureCRT 端

  • 把 id_rsa 导入 SecureCRT
  • Session → Properties → SSH2 → PublicKey → 选择私钥

三、在 Debian 上安装 SecureCRT(Linux 版)

SecureCRT 官方提供 Linux 版本(*.tar.gz / *.deb)

1. 下载

从官网: https://www.vandyke.com/products/securecrt/

2. 安装(deb 示例)

sudo dpkg -i scrt-*.deb
sudo apt -f install

3. 启动

securecrt

四、常见问题

连接超时

  • IP 是否正确
  • 防火墙是否放行
  • SSH 是否运行

中文乱码

SecureCRT:

Session Options → Terminal → Appearance → Font → 选中文字体
Encoding → UTF-8

Debian 拒绝 root 登录

PermitRootLogin prohibit-password

或新建普通用户


如果你是指:

  • SecureCRT 连不上 Debian
  • Debian 中运行 SecureCRT
  • 串口 / 跳板机 / 自动化脚本

可以告诉我具体用途,我可以给你更针对性的配置。

0 踩