温馨提示×

Debian上SecureCRT如何配置端口转发

小樊
52
2025-09-15 01:07:41
栏目: 智能运维

在Debian上配置SecureCRT端口转发有图形界面和命令行两种方法:

  • 图形界面
    • 打开SecureCRT并连接远程服务器。
    • 点击“Options”→“Connection”→“SSH”→“Tunnels”。
    • 点击“Add”,在“Source Port”输入本地监听端口,“Destination”输入远程服务器IP和端口,“Local address”填“127.0.0.1”,选择“Local”转发类型,点击“OK”保存。
    • 重新连接会话使设置生效。
  • 命令行
    • 打开终端,使用ssh -L local_port:remote_host:remote_port user@ssh_server命令配置本地端口转发,如ssh -L 8080:localhost:80 user@192.168.1.100
    • 若配置远程端口转发,使用ssh -R remote_port:localhost:local_port user@ssh_server命令,需确保远程服务器/etc/ssh/sshd_configGatewayPorts yes,并重启SSH服务。

0