SFTP & WebMail Not Working

Running Hestia on Oracle Cloud, Ubuntu 22.04. Having trouble with 2 issues.

  1. No user, not even Admin, can access SFTP. I know additional users can not access SFTP, but this is a problem with the main user and even the Admin. FTP works fine. Port 22 is open.

  2. Set up mail for a user. Put in all DNS records, including A record for webmail. Webmail is set to RoundCube. I can not access webmail. I get an error when I go to https://webmail.domain.com

Oops… something went wrong!

An internal error has occurred. Your request cannot be processed at this time.

For administrators: Please check the application and/or server error logs for more information.

I can not check any logs using FTP or file manager. I am a Linux newbie, first Hestia server.

Thank you in advance for all of your help.

I can not check any logs using FTP or file manager. I am a Linux newbie, first Hestia server.

Hire a sysadmin then… Because we expect users to do at least those basic steps…

For Roundcube:

Hi @digitalwiz

First of all, welcome on Hestia and Linux!

  1. When you create a user on Hestia the user have no SSH Access by default.
    You can turn this on under the edit user settings and then Advanced Options.

  2. Don’t know which DNS server you are using, because when your domain is pointing to the DNS server of you domain provider it has nothing to do with the DNS settings on Hestia. You can check if the A records points to the correct IP on https://mxtoolbox.com/ for example.

My advice:
When you have no experience with Linux, web servers, mail servers and so one… maybe its better to start with a shared hosting or managed server somewhere and start learning about the basics and working of this kind of systems / setups.

To point you in the right direction: Its easier to get into the logs over the command line. And probably you have already access over SSH on your server with a user because you have installed Hestia on it :slight_smile:

Hopefully i helped you a bit.

How do I get SFTP woprking?

My car is broken how I can fix it?

Check /var/log/auth.log and try to login and check the error response. I can’t debug it without an error…

I am able to access SSH using PuTTY. I can not login using SFTP but I can login using FTP. Port 22 is open. The A record for webmail.dopmain.com is pointing to my IP.

this! and that’s reason the following exists aswell: Please read this, before you start!

Hello sir I am also noob in Linux, and also face many problems during website and email setup in past with various “web control panel” like vestacp, cyberpanel, etc etc, now I am using hestiacp as my permanent web hosting control panel.
I started to learn how to setup this control panel by watching YouTube video I recommend you to do that too maybe it will help you.
I give a link of a perticular hestiacp setup tutorial video from where I learn maybe it will help you a little bit, or you can try to learn in your way too, no pressure ofcourse.

I also recommend to use installation command given in official document if possible, but if you want to go completely as per video that’s ok too, also this tutorial video is specially for Oracle cloud so I hope it’s work.

Please don’t take me wrong but it isn’t only installing a server…

You have to take care of things like security, spam prevention and updates so I really recommend that you will also learn about those things instead of just spinning up a server and installing a control panel.

3 Likes

Definitely sir your are correct,
But I say this recommendation because atleast we need start from somewhere instead of just stop it,
when I first start it I just want an website but no idea how to do it, slowly I learn about web server, then Apache, etc, then I know about shared hosting, then cpanel, etc, then I learn about hestiacp and the process going on and on.
I also learn about WordPress, docker etc and it all happen I want a simple website, when I start using hestiacp, “exim, dovecot, ngnix, etc” these are all alien word for me, but then I start to learn about these slowly but I progressing I didn’t stop, and maybe sir you didn’t bleave me but this hestia community forum indirectly help me lot to learn many things abouts web server, and I really thankful for that, and not just that I also learn how hard to make this type of web hosting control panel and maintaining it, if I just backoff from creating a website and hire some expert for developing my website I didn’t know about all of this things, I know still I am noob in all of this but I am happy that what I make or create I did it by myself and for me it’s way more than hiring an expert.
Also I meet this awesome community and people like @eris sir @sahsanu sir because I learn about web hosting control panel, and it all started just from a small wish to make a website by myself.
That’s why I recommend that video because i want this humble man also embark this amazing journey of learning web server instead of just step back.

I watched that video and followed it exactly.

I had managed hosting for a while. Also developed for large companies as part of a team, and also developed many WP websites for myself and others, but did not have to do anything with the server. I am doing this to learn about hosting my own server.

Please tell me how to get SFTP working.

Can I sir ask you for what purpose you want SFTP,
If you want to upload, download, and edit user web files then you can do it by inbuilt file manger in Hestia or you can use filezilla etc, I provide a video for that too

normally steps for ftp and SFTP almost similar and you says sir that ftp is working, so SFTP is working too, maybe then required ports in not enable in Oracle for that check above video too.
If you want SFTP for as backup then you can read official document in Hestia website. I use rclone (previously I use backblaze) for backup so for SFTP please follow official document steps.

If you want to upload, download files in Linux web server, then there is many videos for that you just search it on YouTube. I use mobaxtrem instead of putty so I get ssh, ftp, SFTP in same place for Linux web server I didn’t need to setup anything more in this ssh client, you can use it too if you want.
But again it’s all depends for what purpose you want SFTP.
I hope it helped you sir.

Hi @digitalwiz,

Connect to your server via ssh and show the output of these commands:

First you need to switch to root:

sudo su -

Now execute the 3 commands and copy/paste the output here:

v-list-user admin json | jq -r '.[].SHELL'
grep -riE 'sftp|AllowUsers|Pubkey|Port' /etc/ssh/sshd_config /etc/ssh/sshd_config.d/
ls -la /etc/roundcube/

I’m totally agree with you on this. The only thing I want to say is make it for your self in the first place so you can learn about the process and the basics of Linux before you offer your services to others.

You have to start somewhere to learn it, that’s why i tried to help him in the right direction.

2 Likes

Thank you for your help

root@hcp:~# v-list-user admin json | jq -r '.[].SHELL'
nologin
root@hcp:~# root@hcp:~# grep -riE 'sftp|AllowUsers|Pubkey|Port' /etc/ssh/sshd_config /etc/ssh/sshd_config.d/
/etc/ssh/sshd_config:#Port 22
/etc/ssh/sshd_config:#PubkeyAuthentication yes
/etc/ssh/sshd_config:#GatewayPorts no
/etc/ssh/sshd_config:Subsystem sftp internal-sftp
/etc/ssh/sshd_config:# Hestia SFTP Chroot
/etc/ssh/sshd_config:Match User sftp_dummy99,admin,digitalwiz,digitalwiz_lmp,digitalwiz_md,digitalwiz_awftp,digitalwiz_hmh,digitalwiz_kf,digitalwiz_lwr,digitalwiz_mrm,digitalwiz_digitalwiz_ir,digitalwiz_digitalwiz_olic,digitalwiz_digitalwiz_olix,digitalwiz_am,digitalwiz_olic,digitalwiz_olix,digitalwiz_ir
/etc/ssh/sshd_config:    ForceCommand internal-sftp
root@hcp:~# ls -la /etc/roundcube/
total 92
drwxr-x--x   3 root hestiamail  4096 Dec  5 20:12 .
drwxr-xr-x 127 root root       12288 Dec 16 06:35 ..
-rw-r--r--   1 root hestiamail  3719 Dec  5 20:12 config.inc.php
-rwxr-x--x   1 root hestiamail 64583 Dec  5 20:12 defaults.inc.php
-rwxr-x--x   1 root hestiamail  2760 Dec  5 20:12 mimetypes.php
drwxr-x--x   5 root hestiamail  4096 Dec  5 20:12 plugins
1 Like

To be able to login using sftp, the user must be using a valid shell.

sudo su -
v-change-user-shell admin bash

After that you should be able to login with admin user using sftp.

Fix the perms of /etc/roundcube/ dir:

sudo su -
chown -R root:www-data /etc/roundcube/
find /etc/roundcube/ -type f -iname "*php" -exec chmod 640 {} \;

Once done, try to access to the webmail.

Thank you so much. Webmail is working.

SFTP is still not working. Trying to login using the same user and password as FTP except using port 22.

Error

No supported authentication available (server sent publickey)

Do I have to set up SFTP to use public and private keys? Can I just use User and Password, or is that not secure?