当前位置: 首页 > news >正文

如何在电网网站做备案黄页网络的推广软件

如何在电网网站做备案,黄页网络的推广软件,网站建设流程与步骤,住宿和餐饮网站建设的推广环境准备: 将虚拟机1恢复快照,然后手动配置一个NAT模式IP为192.168.200.100,hostname设置为fuwu1 将虚拟机1复制为虚拟机2,然后手动配置一个NAT模式IP为192.168.200.200,hostname设置为fuwu2 windows准备 xshell 或 pu…

环境准备:
将虚拟机1恢复快照,然后手动配置一个NAT模式IP为192.168.200.100,hostname设置为fuwu1
将虚拟机1复制为虚拟机2,然后手动配置一个NAT模式IP为192.168.200.200,hostname设置为fuwu2
windows准备 xshell 或 putty 或 MobaXterm 或 SecureCRT,建议xshell

一、ssh命令登录以及Xshell登录

1、在虚拟机2上ssh登录虚拟机1

[root@fuwu2 ~]# ssh root@192.168.200.100
The authenticity of host '192.168.200.100 (192.168.200.100)' can't be established.
ECDSA key fingerprint is SHA256:LKt/z3vCmOSq+tKERl7omW+7L4kC0ngZTi7kimfHf5g.
ECDSA key fingerprint is MD5:2f:be:5b:f6:4b:d7:dc:44:ef:0e:c1:c4:ab:cd:a1:a4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.200.100' (ECDSA) to the list of known hosts.
root@192.168.200.100's password: 
Last login: Wed Aug 17 20:27:22 2022
[root@fuwu1 ~]#

2、虚拟机1上退出登录

[root@fuwu1 ~]# exit
登出
Connection to 192.168.200.100 closed.

3、Xshell登录虚拟机1

----界面演示----


二、验证配置禁止root用户远程登录后效果

1、虚拟机1上修改ssh配置文件,禁用root远程登录

[root@fuwu1 ~]# vi /etc/ssh/sshd_config


找到  #PermitRootLogin yes  一行,将 # 删除,并将 yes 修改为 no ,保存退出

2、重启sshd服务

[root@fuwu1 ~]# systemctl restart sshd

3、虚拟机2上以root尝试ssh登录虚拟机1验证

[root@fuwu2 ~]# ssh root@192.168.200.100
root@192.168.200.100's password: 
Permission denied, please try again.
root@192.168.200.100's password: 

发现root用户无法登录

4、Xshell上通过root用户登录尝试虚拟机1,发现也无法登录

5、恢复虚拟机1的ssh配置

[root@fuwu1 ~]# vi /etc/ssh/sshd_config


将 PermitRootLogin no  一行的 no 改回 yes,保存退出

重启sshd

[root@fuwu1 ~]# systemctl restart sshd

服务器2以及xshell以root用户重新登录可以成功登录


三、配置通过密钥登录

配置虚拟机2可以通过密钥的方式远程登录虚拟机1而不需要输入密码。

1、在虚拟机2中生成密钥文件

一路回车即可

[root@fuwu2 ~]# ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:1E+B1rW5+VDzBf+Hy+Ri7saFwwhsVpwSiTHGyWuX1gE root@fuwu2
The key's randomart image is:
+---[RSA 2048]----+
|     o++E= +..o  |
|     .=.o.B .. = |
|       o.*... o.+|
|      o.O .o   ==|
|     . =S. o..* +|
|          . ++.+.|
|           .oo+ .|
|           oo.   |
|           oo    |
+----[SHA256]-----+

2、将公钥文件拷贝到虚拟机1中

[root@fuwu2 ~]# ssh-copy-id root@192.168.200.100
/usr/bin/ssh-copy-id: INFO: attempting to log in with the new key(s), to filter out any that are already installed
/usr/bin/ssh-copy-id: INFO: 1 key(s) remain to be installed -- if you are prompted now it is to install the new keys
root@192.168.200.100's password: Number of key(s) added: 1Now try logging into the machine, with:   "ssh 'root@192.168.200.100'"
and check to make sure that only the key(s) you wanted were added.

3、在虚拟机2上远程登录虚拟机1验证

[root@fuwu2 ~]# ssh root@192.168.200.100
Last login: Wed Aug 17 20:40:50 2022 from 192.168.200.1
[root@fuwu1 ~]#

发现这次没有输入密码即可自动登录,这就是密钥方式登录

4、Xshell配置密钥登录

先在windows上通过Xshell生成一个密钥,然后把密钥的公钥部分添加到虚拟机1的相关文件中

[root@fuwu1 ~]# vi /root/.ssh/authorized_keys

然后就可以密钥登录
-----界面演示-----


四、scp远程拷贝命令演示

scp即 ssh + cp ,实现与远程机器之间的文件拷贝

在虚拟机2上创建一个文件a.txt,并将该文件远程传输到虚拟机1的 /root/ 目录下

[root@fuwu2 ~]# touch a.txt[root@fuwu2 ~]# scp a.txt root@192.168.200.100:/root/a.txt
a.txt

在虚拟机1上验证

[root@fuwu1 ~]# ll /root/ |grep a.txt
-rw-r--r--. 1 root root    0 8月  17 21:12 a.txt

http://www.hkea.cn/news/535146/

相关文章:

  • 网站建设吉金手指专业13中国营销网站
  • 做销售在哪些网站注册好百度产品
  • dw做汽车网站seo排名工具提升流量
  • 网络培训学校排名奉化seo页面优化外包
  • vps除了做网站还能做什么晨阳seo服务
  • seo网站建设优化什么意思网络营销与直播电商专业就业前景
  • 工程建设企业网站网站关键词优化应该怎么做
  • 修复wordpress青岛网站优化
  • 敦煌网站做外贸怎样网页推广怎么做的
  • 南京网站建设优化今日头条普通版
  • 网站编辑的工作职能有哪些活动营销案例100例
  • 小程序招商加盟平台我是seo关键词
  • wordpress 发帖机镇江抖音seo
  • 网站建设的小结可以发外链的论坛有哪些
  • 网站正常打开速度网店营销与推广策划方案
  • 义乌 网站制作进入百度app
  • 做外围网站赌球红树林seo基础入门免费教程
  • 绿色风格网站seo排名赚钱
  • 南宁企业免费建站百度推广营销怎么做
  • 建立个人网站的成本短视频seo营销系统
  • 深圳公司名称大全网站结构优化的内容和方法
  • 安康市代驾公司上海网站关键词排名优化报价
  • 怎么在网站上建设投票统计在线培训系统app
  • 泰州网站建设哪家好网站seo的主要优化内容
  • 洛卡博网站谁做的seo权重查询
  • 东莞网络科技公司有哪些山东网站seo
  • 网站建设需要学什么网站模板购买
  • 用html做的游戏网站关键词推广效果分析
  • 做影视网站引流正规推广平台有哪些
  • 免费下载简历模板北京seo排名厂家