I have HUAWEI S2300 Switch, this is my configuration:
[HUAWEI-A]dis current-configuration
#
!Software Version V100R005C01
sysname HUAWEI-A
#
FTP server enable
#
vlan batch 1 to 4 7 to 8
#
cluster enable
ntdp enable
ntdp hop 16
ndp enable
#
dhcp enable
#
undo http server enable
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher !F&43ULTPTE*61\PR4!PYA!!
local-user admin privilege level 3
local-user admin service-type ftp
local-user huawei password cipher N`C55QK<`=/Q=^Q`MAF4<1!!
local-user huawei privilege level 3
local-user huawei service-type ssh
local-user root password cipher WY$\*-[*C3%*61\PR4!PYA!!
local-user root privilege level 3
local-user root service-type telnet ssh
#
interface Vlanif1
ip address dhcp-alloc
#
interface Vlanif2
ip address 10.10.11.32 255.255.255.0
#
...
#
snmp-agent
snmp-agent local-engineid 000007DB7F00000100006136
snmp-agent sys-info version v3
#
sftp server enable
stelnet server enable
ssh user admin
ssh user huawei
ssh user admin authentication-type password
ssh user huawei authentication-type password
ssh user admin service-type stelnet
ssh user huawei service-type stelnet
#
user-interface maximum-vty 15
user-interface con 0
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
user-interface vty 5 14
authentication-mode aaa
#
You see I have created a huawei
user use ssh, I can ssh login success use huawei
account, but I can not sftp login it.
this is the information I use filezilla client:
response: fzSftp started, protocol_version=8
command: open "huawei@10.10.11.32" 22
command: Pass: ******
error: Server sent disconnect message
error: type 2 (protocol error):
error: "The connection is closed by SSH server
error: "
error: cannot connect to server.
edit-01
I added the below configuration:
[Z306-LW-A-aaa]local-user huawei service-type telnet ssh ftp sftp
^
Error:Too many parameters found at '^' position.
[Z306-LW-A-aaa]local-user huawei service-type telnet ssh ftp
there only can add the telnet ssh ftp
, can not add sftp
.
Edit-02
No matter I set the ftp directory to flash:
or flash:/
local-user huawei service-type telnet ssh ftp
local-user huawei ftp-directory flash:
when I use filezilla connect there always come out this error:
Status: Unsecure server, does not support FTP over TLS.
Status: The server does not support non-ASCII characters.
Status: Logged in
Status: Read directory listing...
Command: PWD
Response: 257 "flash:" is current directory.
Error: Unable to parse the returned path.
Error: Failed to read directory listing
huawei
have the authorization to use sftp? It appears thatssh user huawei service-type stelnet
is something like an authorization command to use thestelnet
service. Is there such a thing asssh user huawei service-type sftp
?ssh user <username> service-type sftp
and it probably needs to be complimented byssh user <username> sftp-directory <base-directory>: