安装ssh-client命令:
sudo apt-get install openssh-client
安装ssh-server命令:
sudo apt-get install openssh-server
/etc/init.d/ssh start
sudo gedit /etc/ssh/sshd_config
-
将PermitRootLogin prohibit-password那一行修改为PermitRootLogin yes
-
port 22前面的#去掉
sudo service ssh restart
xxxxxxxxxx //Emplyee.javapackage com.example.test01;public class Employee { private Integer id; private String text; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getText() { return text; } public void setText(String text) { this.text = text; }}java
查看虚拟机的IP地址:ifconfig
如果找不到则使用如下命令安装工具包
sudo apt install net-tools //使用apt源安装net-tools工具包
然后在termius中输入IP地址和ssh相关信息