簡易搭建堡壘機


1.搭建jumpServer

jumpserver官網:安裝部署 - JumpServer 文檔

2.登錄界面

賬戶:admin

密碼:admin

 

 

 

 

 

 3.創建用戶

 

 

 

 

 

 

 

 

 4.創建普通用戶和特權用戶

普通用戶

 

 

 

 

 

 

 

 

 

 

 

 特權用戶

[root@localhost ~]# ssh-keygen -f jumpserver #生成密匙
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in jumpserver.
Your public key has been saved in jumpserver.pub.
The key fingerprint is:
SHA256:yAkBJTs2DMJBzRp10xfU+P4QTwG1B2UcUkxhvmTSdBs root@localhost.localdomain
The key's randomart image is:
+---[RSA 2048]----+
|=oB+oo. .o+.o+*E+|
|.= =.... o . .Xo+|
|  O .   . .  o.B |
| o o o o   o .= .|
|      + S . +  . |
|           o .   |
|            o    |
|             .   |
|                 |
+----[SHA256]-----+

 

 

 

 

 

 5.資產管理

創建資產

 

 

 

 

 

 

 

 

 

 

 配置資產

[root@localhost ~]# useradd jumpserver
[root@localhost ~]# visudo 
....
## Allow root to run any commands anywhere
root    ALL=(ALL)       ALL
jumpserver ALL=(ALL) NOPASSWD:ALL
## Allows members of the 'sys' group 
....
[root@localhost ~]# echo 123456 | passwd --stdin jumpserver
更改用戶 jumpserver 的密碼 。
passwd:所有的身份驗證令牌已經成功更新。
[root@localhost ~]# ssh-copy-id -i jumpserver.pub jumpserver@192.168.200.184
/usr/bin/ssh-copy-id: INFO: Source of key(s) to be installed: "jumpserver.pub"
The authenticity of host '192.168.200.184 (192.168.200.184)' can't be established.
ECDSA key fingerprint is SHA256:bhEdVM3mhW8PDNYqILImzNCA1466NnEMybHxMKKNFmU.
ECDSA key fingerprint is MD5:a3:60:a4:23:7d:83:ba:c7:1b:bf:0c:8f:04:ea:d6:d4.
Are you sure you want to continue connecting (yes/no)? yes
/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
jumpserver@192.168.200.184's password: 

Number of key(s) added: 1

Now try logging into the machine, with:   "ssh 'jumpserver@192.168.200.184'"
and check to make sure that only the key(s) you wanted were added.

 

 

 

 

 

 6.資產授權

 

 

 

 

 

 

 

 

 

 

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM