This is because the user has only opened SFTP and SSH has been banned
You can login to this machine through SSH of other hosts
app@home:/software>ssh [email protected]
Authorized only. All activity will be monitored and reported
[email protected]'s password:
This service allows sftp connections only.
Connection to 192.168.0.1 closed.
app@home:/software>sftp [email protected] ##success
This is because/etc/SSH/sshd is set on the server side_ In the config file, it needs to be set to:
Allowtcpforwarding should be set to yes
If it is not set to yes, users can only access the specified directory through SFTP, and can’t log in through SSH
Only by changing allowtcpforwarding no to allowtcpforwarding yes can users log in through SSH and then access the directory
At the same time, forcecommand internal SFTP should also be commented out
#ChrootDirectory /software/sftp
#ForceCommand internal-sftp
##AllowTcpForwarding no
AllowTcpForwarding yes
Then restart the service (roo user service sshd restart), and try again to succeed
app@home:/software>ssh [email protected]
Authorized only. All activity will be monitored and reported
[email protected]'s password:
Last login: Sun Jun 2 14:22:00 2019 from 192.168.102.82
mysftp@remoteServer:/home/ap/mysftp>ll
Similar Posts:
- [Solved] SSH connect error: permission denied, please try again
- [Solved] MySQL Connect Error: Can’t connect to MySQL server on ‘ ‘(61)
- Description of SFTP function error in jumpserver
- com.jcraft.jsch.JSchException: Auth fail [How to Solve]
- [Solved] Forbid root, handle error sudo must be owned by uid 0
- FTP connection error 530 permission denied solution
- Su command error Su: permission denied [How to Solve]
- How to Solve Error: ssh_exchange_identification:read connection reset by peer
- Activemq Console Error: java.lang.SecurityException: User name [system] or password is invalid.
- The Chrome browser cannot remember the password and does not prompt to save the password win10 [How to Solve]