By luccijenya
When we connect to server via SFTP using Filezilla we receive “Connection refused” error.
host: droplet ip address port: 22 user and pass like in hosting account.
Also we try to use login “root” and pass from hosting account.
Please help
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
We have such info in this file /etc/ssh/sshd_config : http://prntscr.com/po49s5
Hi @luccijenya,
Can you please make sure the following is present in your /etc/ssh/sshd_config
Subsystem sftp internal-sftp
Match group sftponly
ChrootDirectory /home/%u
X11Forwarding no
AllowTcpForwarding no
ForceCommand internal-sftp
Additionally, Often SFTP error arises when ssh is not properly installed on the server. So, when you try to connect to SFTP server it always gives error “ssh: connect to host x.x.x.x port 22: Connection refused“.
In Linux servers, we check and make sure that SSH is installed properly by executing the command
dpkg --get-selections | grep ssh
If there is an error, then we install it correctly by running the command:
apt-get install openssh-server
Finally, we restart the service and ensure that the user could connect to SFTP server without any failure.
Regards, KDSys
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.