kali系統sftp服務

2021-10-22 06:23:06 字數 2624 閱讀 5517

一、更新源列表

在安裝之前需要先更新一下源列表,不然可能會導致出錯,詳細可以參考文章kali更新源,下面給出kali2.0的兩個源列表

starnight@kali:~$ sudo vim /etc/apt/sources.list #新增源

#中科大的源 - 可能有奇效:

deb kali-rolling main non-free contrib

#科大源

deb sana main non-free contrib

deb-src sana main non-free contrib

deb -security sana/updates main contrib non-free

#阿里源-kali2.0較好用

deb sana main non-free contrib

deb-src sana main non-free contrib

deb -security sana/updates main contrib non-free

下面是只新增阿里源的更新情況:

starnight@kali:~$ sudo -i

root@kali:~# sudo apt-get update && apt-get upgrade

hit:1 sana inrelease

hit:2 -security sana/updates inrelease

reading package lists... done                      

reading package lists... done

building dependency tree       

reading state information... done

calculating upgrade... done

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

回到頂部

二、安裝和配置vsftpd伺服器

回到頂部

1、安裝vsftpd伺服器

root@kali:~# exit

logout

starnight@kali:~$ sudo apt-get install vsftpd

檢視執行狀態:

starnight@kali:~$ sudo mkdir /home/uftp

starnight@kali:~$ ls /home/

starnight  uftp

starnight@kali:~$ sudo chmod 777 /home/uftp/ #需要改變檔案的讀寫許可權,為了簡單,設定成777,不然會導致無法建立檔案

回到頂部

3、新建使用者並設定密碼

starnight@kali:~$ sudo useradd -d /home/uftp/ -s /bin/bash uftp

starnight@kali:~$ sudo passwd uftp

enter new unix password:

retype new unix password:

passwd: password updated successfully

回到頂部

4、修改配置檔案

starnight@kali:~$ vim /etc/vsftpd.conf

可以在檔案開頭新增以下內容

userlist_deny=no

userlist_enable=yes

userlist_file=/etc/allowed_users #允許登入的使用者

seccomp_sandbox=no

除此之外還需要取消下面的注釋:

write_enable=yes #取消注釋,使其生效,不然無法寫入檔案

回到頂部

5、新建/etc/allowed_users,新增允許訪問的使用者,我們在檔案中新增我們剛才建立的使用者uftp

starnight@kali:~$ vim /etc/allowed_users

uftp

回到頂部

6、檢視檔案/etc/ftpusers,檔案中的列表是禁止訪問使用者

# /etc/ftpusers: list of users disallowed ftp access. see ftpusers(5).

root

daemon

binsys

sync

games

manlp

mail

news

uucp

nobody

回到頂部

7、重啟伺服器vsftpd

到此為止,vsftpd伺服器在kali上就安裝完成了,下面簡單演示一下如何用命令傳輸檔案

回到頂部

三、用ftp命令傳輸檔案

ftp ip-address

輸入使用者名稱和密碼

put  #傳送檔案

local-file: path

remote-file: path

get  #接收檔案

local-file: path

remote-file: path

windows使用者可以是用winscp這個工具進行傳輸。

kali系統安裝

kali live 安裝到u盤 用live u盤安裝kali linux 硬碟安裝kali linux 步驟如下 一 用win32 disk image把iso檔案刻到16g u盤上,引導啟動後剩餘的空間是不可寫的 如同光碟 二 用ghost來備份u盤,方便後面再用ghost還原u盤到分割槽 選 l...

sftp服務部署

1.sftp的配置 檢視ssh版本 sftp是基於ssh協議的子協議,首先檢視ssh版本,openssh server版本至少是4.8p1,因為配置許可權需要版本新增的新配置項chrootdirectory來完成 root izys605x4c311swvscc1y0z ssh v openssh ...

SFTP服務的使用!!

在client端安裝xshell或者securecrt等具有sftp檔案傳輸功能的軟體,在伺服器端安裝好sftp服務並啟動,就可以用sftp傳輸檔案了!from 舉例,如遠端主機的 ip 是 202.206.64.33或者是網域名稱www.hebust.edu.cn,使用者名稱是 fyt 在命令列模...