0
点赞
收藏
分享

微信扫一扫

kali安装amritage

AbrahamW 2022-01-06 阅读 48
linuxdebian

Kali(2021.12.21版)安装Armitage流程 && 不能连接数据库问题的解决

Step1

配置安装的环境,包括配置软件源、更新源和更行系统等。
(由于此步骤在上一篇博客中有介绍,故不赘述)

Step2:安装
输入:

armitage

输出:

Command 'armitage' not found, but can be installed with:
apt install armitage
Do you want to install it? (N/y)y

输入:y(见上文输出图)
输出:

Get:1 http://http.kali.org/kali kali-rolling/main amd64 armitage all 20160709+ds1-0kali2 [3916 kB]
Fetched 3916 kB in 4s (927 kB/s)    
Selecting previously unselected package armitage.
(Reading database ... 320029 files and directories currently installed.)
Preparing to unpack .../armitage_20160709+ds1-0kali2_all.deb ...
Unpacking armitage (20160709+ds1-0kali2) ...
Setting up armitage (20160709+ds1-0kali2) ...
Processing triggers for kali-menu (2021.4.2) ...

此时,Armitage已经安装完成。

Step3:启动
输入:

service postgresql start 
msfdb init 
armitage 

当输入“armitage”后,弹出框框,在host中输入127.0.0.1,默认是该地址,一样可不变;点击“connect”,再弹出一个框框,点击“yes”。接下来,便是见证…报错的时刻!

Step4:报错的解决
错误提示:
“can not connect to database:”…
“authentication method 10 not supported…pg_hba.conf…”
解决思路:
1、首先找到pg_hba.conf查看哪里配置出错,因为是.conf文件,所以考虑在/etc目录下寻找。
输入:

find /etc -name "pg_hba.conf"

输出:

/etc/postgresql/14/main/pg_hba.conf

输入:

mousepad /etc/postgresql/14/main/pg_hba.conf

将文件内容末尾部分修改如下:

# TYPE  DATABASE        USER            ADDRESS                 METHOD

# "local" is for Unix domain socket connections only
#local   all             all                                     trust
# IPv4 local connections:
#host    all             all             127.0.0.1/32            scram-sha-256
# IPv6 local connections:
#host    all             all             ::1/128                 scram-sha-256
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local   replication     all                                     peer
#host    replication     all             127.0.0.1/32            scram-sha-256
#host    replication     all             ::1/128                 scram-sha-256

local   all     all                                     trust
host    all     all             127.0.0.1/32            trust
host    all     all             ::1/128                 trust
host    all     all             0.0.0.0/0               password

完成之后重启数据库:

systemctl restart postgresql

再启动Armitage即成功!

举报

相关推荐

0 条评论