SecureCRT配置Debian远程访问步骤
在配置前,需先确认Debian服务器的网络信息:
ip addr show或ifconfig命令获取);root或普通用户+sudo权限)。从SecureCRT官方网站下载对应操作系统的安装包(如Windows版),以管理员身份运行安装程序,按照向导完成安装(默认选项即可满足基本需求)。
root或普通用户)。在“Authentication”页面,选择Password Authentication,在“Password”字段输入对应用户的密码,点击Next。
.ppk格式,需提前生成);连接成功后,进入Debian服务器的命令行界面,可执行以下常见操作:
uname -a(查看内核版本)、lsb_release -a(查看发行版信息);sudo apt update && sudo apt upgrade -y(更新软件包);ls(列出目录内容)、cd(切换目录)、vim/nano(编辑文件);systemctl status ssh(查看SSH服务状态)、systemctl restart ssh(重启SSH服务)。编辑Debian服务器的/etc/ssh/sshd_config文件,找到#PermitRootLogin prohibit-password,修改为PermitRootLogin no,保存后重启SSH服务:sudo systemctl restart sshd。
使用ufw(Ubuntu防火墙工具)限制SSH访问:
sudo ufw allow from [本地IP] to any port 22;sudo ufw enable;sudo ufw status。sudo adduser [用户名](按提示设置密码);sudo usermod -aG sudo [用户名];su - [用户名],输入密码即可使用sudo权限。ssh-keygen -t rsa -b 4096),并将公钥(id_rsa.pub)复制到Debian服务器的~/.ssh/authorized_keys文件中;sudo systemctl status ssh)、防火墙是否放行端口、网络是否通畅(ping [服务器IP])。