温馨提示×

怎样配置linux securecrt

小樊
38
2026-09-18 19:45:57
栏目: 智能运维

下面以 Windows / Linux 客户端使用 SecureCRT 连接 Linux 服务器 为例,说明常见配置方法。如果你指的是“在 Linux 上用 SecureCRT”或“配置 Linux 服务端安全”,也可以告诉我,我可以再细化。


一、SecureCRT 基本连接配置(连接 Linux 服务器)

1. 新建连接

  1. 打开 SecureCRT
  2. File → Connect → New Session
  3. 协议选择:
    • SSH2(推荐)
  4. Hostname:Linux 服务器 IP 或域名
  5. Port:默认 22
  6. Username:Linux 用户名

2. 认证方式配置

密码登录(简单)

  • 在 Authentication 中勾选 Password
  • 输入密码即可

公钥登录(推荐,更安全)

  1. 本地生成密钥(SecureCRT):
    • Tools → Create Public Key
    • 选择 RSA / Ed25519
    • 设置 passphrase(可选)
  2. 将公钥上传到 Linux:
    mkdir -p ~/.ssh
    chmod 700 ~/.ssh
    
    把 id_xxx.pub 内容写入:
    cat id_xxx.pub >> ~/.ssh/authorized_keys
    chmod 600 ~/.ssh/authorized_keys
    
  3. SecureCRT 中:
    • Authentication → PublicKey
    • 选择私钥文件

二、常见安全加固配置(Linux 服务端)

1. 修改 SSH 配置

编辑:

sudo vi /etc/ssh/sshd_config

推荐配置:

Port 2222                 # 可改非默认端口
PermitRootLogin no
PasswordAuthentication no
PubkeyAuthentication yes
MaxAuthTries 3
ClientAliveInterval 300

重启服务:

sudo systemctl restart sshd

三、SecureCRT 实用配置

1. 字符编码(避免中文乱码)

  • Session Options → Terminal → Appearance
  • Character encoding:UTF-8

2. 自动登录

  • Session Options → Connection → SSH2
  • 填写用户名 / 私钥

3. 日志记录

  • Session Options → Log File
  • 可设置自动按日期保存

四、防火墙注意

确保端口开放:

sudo firewall-cmd --add-port=2222/tcp --permanent
sudo firewall-cmd --reload

如果你是指:

  • ✅ Linux 上安装并使用 SecureCRT
  • ✅ SecureCRT 连接失败排错
  • ✅ 批量管理多台 Linux 服务器

可以告诉我你的具体场景,我可以直接给你对应步骤。

0 踩