首页天道酬勤,

,

admin 05-12 05:59 157次浏览

1 .首先检查虚拟机的ip

~$ ifconfig

Command 'ifconfig' not found,but can be安装with :

sudo apt安装net-tools

是的,请按照提示操作

~$ sudo apt install net-tools

这样就知道了IP

2.winscp传输数据

访问被拒绝

3 .解决程序

我看了几个教程,看看有没有联网

查看主机ip

打开Windows命令行并输入ipconfig

可以查询主机的ip

然后,返回虚拟机

~$ ping“主机ip”

image.png

从图上看是联网的,但换个角度来看,不是没有设置SSH吗?

~ $服务sshd start

failedtostartsshd.service : unit sshd.service not found。

~$ ssh localhost ssh

sh : connecttohostlocalhostport 22: connection refused

……极度长着草,SSH没有打开

那很好。 设置SSH

~ $ sudo apt-getinstallopenssh -服务器

~$ sudo /etc/init.d/ssh start

启动ssh (viasystemctl ) : ssh.service。

请查看ip并尝试连接到winscp。 成功了。

4 .其他可能原因

1.Linux防火墙未关闭(Ubuntu通常默认关闭) ) ) ) )。

sudo ufw disable

2 .虚拟机没有独立的IP地址,无法连接到网络

将网络适配器更改为桥接模式,然后重新启动

IOS开发UITextView回收或关闭键盘拦截器在ssm和springboot中的使用最简单的方式在SSM/SpringBoot上实现登录过滤器
, ,
相关内容