xshell连接本地Linux虚拟机!

时间:2023-03-08 20:42:27
xshell连接本地Linux虚拟机!
  1. 终端输入ifconfig获取本地虚拟机的IP地址;
  2. 安装openssh-server

    sudo apt-get install openssh-server

    查看server是否启动:

    ps -ef |grep ssh

    如果看到/usr/sbin/sshd -D,说明服务已经启动,否则服务尚未启动,那么需要启动server:

    /etc/init.d/ssh start

    接下来就可以用xshell连接了。如果xshell中看到乱码的情况,那么可以xshell的编码改成UTF-8!

    xshell中修改编码为UTF-8的方法:[文件]–>[打开]–>在打开的session中选择连接的那个 ,点击properties -> [Terminal ] ,在右边的translation先选择utf8,然后重新连接服务器即可.