欧美free性护士vide0shd,老熟女,一区二区三区,久久久久夜夜夜精品国产,久久久久久综合网天天,欧美成人护士h版

首頁綜合 正文
目錄

柚子快報(bào)激活碼778899分享:postman 搭建SSH服務(wù)

柚子快報(bào)激活碼778899分享:postman 搭建SSH服務(wù)

http://yzkb.51969.com/

1.搭建SSH服務(wù)

1)安裝nodejs服務(wù)

nodejs是一個(gè)運(yùn)行環(huán)境,和javajdk運(yùn)行環(huán)境是一樣的 [root@tdr ~]# wget -O /etc/yum.repos.d/CentOS-Base.repo https://mirrors.aliyun.com/repo/Centos-7.repo [root@tdr ~]# yum clean all [root@tdr ~]# yum makecache [root@tdr ~]# yum -y install epel-release.noarch ? ? ? ? ? ? ? ? //必須先把原先的epel卸載掉,否則找不到nodejs [root@tdr ~]# yum list | grep nodejs [root@tdr ~]# yum -y install nodejs.x86_64

2)簡易服務(wù)器環(huán)境

安裝包管理器 npm node package manager [root@tdr ~]# yum -y install npm [root@tdr ~]# npm -v 8.19.4 [root@tdr ~]# npm config set registry https://registry.npmmirror.com ? ? ? ? ? //npm設(shè)置國內(nèi)鏡像 [root@tdr ~]# npm install @vue/cli -g ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //安裝vue的腳手架軟件,-g是全局安裝 [root@tdr ~]# find / -name "vue" [root@tdr ~]# /usr/local/bin/vue -V @vue/cli 5.0.8 [root@tdr ~]#? 使用vue腳手架創(chuàng)建一個(gè)前端項(xiàng)目? 在當(dāng)前目錄創(chuàng)建vuehtml000目錄,程序員就可以在這個(gè)文件中開發(fā)前端頁面? [root@tdr ~]# /usr/local/bin/vue create vuehtml000 [root@tdr ~]# tree vuehtml000/ ? ? ? ? ? ? ? ? ? ? ?//用樹狀顯示 啟動前端項(xiàng)目 [root@tdr ~]# cd vuehtml000/ [root@tdr vuehtml000]# npm run server DONE ?Compiled successfully in 202ms ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?10:27:19

? App running at: ? - Local: ? http://localhost:8080/? ? - Network: http://192.168.1.100:8080/

瀏覽器訪問http://192.168.1.100:8080/ ? ? ? ? ? ? ? ? ? ? ? ? //記得關(guān)閉防火墻 [root@tdr vuehtml000]# npm run build ? ? ? ? ? ? ? ? ? ? //構(gòu)建html000的靜態(tài)頁面 將這些靜態(tài)部署到nginx的html [root@tdr vuehtm1000]# ls ./dist/ css ?favicon.ico ?index.html ?js [root@tdr vuehtml000]# find / -name "html" -type d ? ? ? ? ? ? ? ? ? ? ? ?//找到nginx的html [root@tdr vuehtml000]# cp -R ./dist/* /usr/share/nginx/html/ [root@tdr vuehtml000]# nginx? [root@tdr vuehtml000]# nginx -s reload ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //重啟 瀏覽器訪問http://192.168.1.100

非對稱加密 ? ras 有兩條密碼本 公鑰 ? ? ? ? ? ?用于加密 ? ? ? ? ? ?保障不是明文傳輸 私鑰 ? ? ? ? ? ?用于解密 ? ? ? ? ? ?將加密的文件解析成明文

[root@tdr vuehtm1000]# netstat -lntup|grep sshd ? ? ? ? ? ? ? //查看端口占用 tcp ? ? ? ?0 ? ? ?0 0.0.0.0:22 ? ? ? ? ? ? ?0.0.0.0:*

知道錯(cuò)了沒:

[root@tdr vuehtm1000]# netstat -lntup|grep sshd ? ? ? ? ? ? ? //查看端口占用 tcp ? ? ? ?0 ? ? ?0 0.0.0.0:22 ? ? ? ? ? ? ?0.0.0.0:* ? ? ? ? ? ? ? LISTEN ? ? ?1134/sshd ? ? ? ? ?? tcp6 ? ? ? 0 ? ? ?0 :::22 ? ? ? ? ? ? ? ? ? :::* ? ? ? ? ? ? ? ? ? ?LISTEN ? ? ?1134/sshd ? ? ? ? ??

3)遠(yuǎn)程管理SSH服務(wù)

安裝SSH服務(wù):openssh、ssh-server、ssh-client [root@tdr ~]# ssh -l root -p 22 192.168.1.125 root@192.168.1.125's password:? Last login: Wed Jul 17 11:32:25 2024 from 192.168.1.1 [root@tds ~]#?

(1)關(guān)閉防火墻以及selinux(selinux不關(guān)改不了端口)

[root@tdr ~]# systemctl stop friewalld [root@tdr ~]# systemctl disable firewalld [root@tdr ~]# setenforce 0 [root@tds ~]# systemctl stop firewalld [root@tds ~]# systemctl disable firewalld [root@tds ~]# setenforce 0

(2)下載openssh、ssh-server、ssh-client

[root@tds ~]# yum -y install openssh [root@tds ~]# yum -y install openssh-server [root@tds ~]# yum -y install openssh-clients

(3)開啟、關(guān)閉

[root@tds ~]# systemctl start sshd ? ? ? ? //啟動 [root@tds ~]# systemctl stop sshd ? ? ? ? //關(guān)閉 [root@tds ~]# systemctl restart sshd ? ? ? ? ? ? ? ? ? ? //重啟 [root@tds ~]# systemctl disable sshd ? ? ? ? ? ? ? ? ? ? ?//開機(jī)不自啟

(4)遠(yuǎn)程連接另一臺主機(jī)

[root@tdr ~]# ssh -l root -p 22 192.168.1.125 root@192.168.1.125's password:? Last login: Wed Jul 17 11:32:25 2024 from 192.168.1.1 [root@tds ~]#?

(5)修改配置文件,不允許root賬戶遠(yuǎn)程登陸

[root@tdr ~]# vim /etc/ssh/sshd_config? [root@tdr ~]# systemctl restart sshd 38 ? ?PermitRootLogin no ? ? ? ? ? ? ? ? ? ? //去掉注釋,yes改為no 去另一臺主機(jī) [root@tds ~]# ssh -l root -p 22 192.168.1.100 ? ? ? ? //用root用戶遠(yuǎn)程登陸 root@192.168.1.100's password:? Permission denied, please try again. root@192.168.1.100's password:? Permission denied, please try again. root@192.168.1.100's password:? Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password). ? ? ? ? ? ? ?//未登陸成功 [root@tds ~]#? [root@tds ~]# ssh -l tdr -p 22 192.168.1.100 tdr@192.168.1.100's password:? Last login: Wed Jul 17 14:40:40 2024 from 192.168.1.125 ? ? ? ? //遠(yuǎn)程登陸100主機(jī)tdr用戶成功 [tdr@tdr ~]$ exit ? ? ? ? //退出登錄

知道錯(cuò)了沒: [tdr@tdr ~]$ exit ? ? ? ? //退出登陸

(6)創(chuàng)建兩個(gè)用戶

[root@tds ~]# useradd zhangsan [root@tds ~]# useradd lisi [root@tds ~]# passwd zhangsan ? ? ? //添加密碼 [root@tds ~]# passwd lisi [root@tds ~]# mkdir /code/ ? ? ? ? ? ? ? //創(chuàng)建用戶數(shù)據(jù)目錄 [root@tds ~]# groupadd code ? ? ? ? ? ? ? ? ?//創(chuàng)建附屬組 [root@tds ~]# usermod -g code zhangsan ? ? ? ? ? ? //將用戶添加到組 [root@tds ~]# usermod -g code lisi? [root@tds ~]# chgrp -R code /code/ ? ? ? ? ? ? ?//將code所屬組修改為code組 [root@tds ~]# chmod -R g+w /code/ ? ? ? ? ?//給屬組增加寫的權(quán)限

回到原來的主機(jī) [root@tds ~]# vim /etc/ssh/sshd_config 17 Port 9999 ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //去掉注釋,修改端口為9999 [root@tds ~]# systemctl restart sshd ? ? ? ? ? ? ? ? ? ?//重啟ssh服務(wù)

去另一臺主機(jī) ssh連接服務(wù)器,如果服務(wù)端?是22,可以不?添加-p選項(xiàng) 如果不是22端?,就不許添加-p選項(xiàng) ssh -p 9999 -l lisi 192.168.71.135 ? ? 或ssh -p 9999 lisi@192.168.71.135 [root@tds ~]# ssh -l tdr -p 9999 192.168.1.100 tdr@192.168.1.100's password:? Last login: Wed Jul 17 14:50:55 2024 from 192.168.1.125 [tdr@tdr ~]$ ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? //連接成功 [tdr@tdr ~]$ exit 登出 Connection to 192.168.1.100 closed. [root@tds ~]#?

(7)?專業(yè)?具pwgen?成?戶密碼

[root@tdr ~]# yum -y install pwgen [root@tdr ~]# pwgen -cnBs1 10 1

(8)擴(kuò)展:pwgen密碼?成器的使?

?法: pwgen 選項(xiàng)參數(shù) ?度 ?成個(gè)數(shù) Usage: pwgen [ OPTIONS ] [ pw_length ] [ num_pw ] # 密碼中?少包含?個(gè)?寫字? -c or –capitalize # 密碼中不包含?寫字? -A or –no-capitalize # 密碼中?少包含?個(gè)數(shù)字 -n or –numerals # 密碼中不包含數(shù)字 -0 or –no-numerals # 密碼中?少包含?個(gè)特殊符號 -y or –symbols # ?成完全隨機(jī)密碼 -s or –secure # 密碼中不包含歧義字符(例如1,l,O,0) -B or –ambiguous # 使?SHA1 hash給定的?件作為?個(gè)隨機(jī)種? -H or –sha1=path/to/file[#seed] # 在列中打印?成的密碼-C # 不要在列中打印?成的密碼,即???個(gè)密碼 -1 # 不要使?任何元?,以避免偶然的臟話 -v or –no-vowels

2.SSH服務(wù)補(bǔ)充

1)scp命令

主要功能:?于Linux系統(tǒng)與Linux系統(tǒng)之間進(jìn)??件的傳輸(上傳、下載) 上傳: ?scp [選項(xiàng)] 本地?件路徑 遠(yuǎn)程?戶名@遠(yuǎn)程服務(wù)器的IP地址:遠(yuǎn)程?件存儲路徑 -r : 遞歸上傳,主要針對?件夾 -P : 更換了SSH服務(wù)的默認(rèn)端?必須使?-P選項(xiàng) 下載: scp [選項(xiàng)] 遠(yuǎn)程?戶名@遠(yuǎn)程服務(wù)器的IP地址:遠(yuǎn)程?件路徑 本地?件存儲路徑 -r : 遞歸上傳,主要針對?件夾 -P : 更換了SSH服務(wù)的默認(rèn)端?必須使?-P選項(xiàng)

2)踢出用戶

[root@tds ~]# w ? ? ? ? ? ? ? ? ? ? ? ? ? ? //查看當(dāng)前在線用戶 ?17:18:35 up ?3:52, ?3 users, ?loa

知道錯(cuò)了沒: 2)踢出用戶

[root@tds ~]# w ? ? ? ? ? ? ? ? ? ? ? ? ? ? //查看當(dāng)前在線用戶 ?17:18:35 up ?3:52, ?3 users, ?load average: 0.00, 0.01, 0.05 USER ? ? TTY ? ? ?FROM ? ? ? ? ? ? LOGIN@ ? IDLE ? JCPU ? PCPU WHAT root ? ? tty1 ? ? ? ? ? ? ? ? ? ? ?14:39 ? ?2:37m ?0.02s ?0.02s -bash root ? ? pts/2 ? ?192.168.1.1 ? ? ?13:52 ? ?3.00s ?0.14s ?0.13s ssh -l root -p 22 192.168.1.125 root ? ? pts/3 ? ?tds ? ? ? ? ? ? ?14:46 ? ?3.00s ?0.21s ?0.02s w [root@tds ~]# pkill -kill -t pts/1 ? ? ? ? ? ? ? ?//踢出某個(gè)賬號

3.ssh免密登錄

[zhangsan@y root]$ ssh-keygen //按三次回車 [zhangsan@y ~]$ ls ./.ssh/? id_rsa ?id_rsa.pub ?known_hosts [zhangsan@y ~]$ ssh-copy-id root@192.168.1.20 id_rsa:保存私鑰 id_rsa.pub:保存公鑰 authorized_keys:保存已授權(quán)的客戶端公鑰 known_hosts:保存已認(rèn)證的遠(yuǎn)程主機(jī)公鑰 ?

柚子快報(bào)激活碼778899分享:postman 搭建SSH服務(wù)

http://yzkb.51969.com/

文章來源

評論可見,查看隱藏內(nèi)容

本文內(nèi)容根據(jù)網(wǎng)絡(luò)資料整理,出于傳遞更多信息之目的,不代表金鑰匙跨境贊同其觀點(diǎn)和立場。

轉(zhuǎn)載請注明,如有侵權(quán),聯(lián)系刪除。

本文鏈接:http://gantiao.com.cn/post/19601961.html

發(fā)布評論

您暫未設(shè)置收款碼

請?jiān)谥黝}配置——文章設(shè)置里上傳

掃描二維碼手機(jī)訪問

文章目錄