Backup SFTP connection fails

I try to connect SFTP for back up but cyberpanel gives error below. I can connect SFTP fine with filezilla but not cyberpanel. What I need to do get connection work?

Operation Failed!
/root/.ssh/known_hosts:1: invalid line
/root/.ssh/known_hosts is not a valid known_hosts file.
Not replacing existing known_hosts file because of errors
End Of File (EOF). Exception style platform.

command: /usr/bin/ssh
args: [’/usr/bin/ssh’, ‘-o’, ‘StrictHostKeyChecking=no’, ‘-p’, ‘22’, ‘sftp@???.???.???.??’, ‘mkdir ~/.ssh || rm -f ~/.ssh/temp && rm -f ~/.ssh/authorized_temp && cp ~/.ssh/authorized_keys ~/.ssh/temp || chmod 700 ~/.ssh || chmod g-w ~’]
buffer (last 100 chars): b’’
before (last 100 chars): b’ssh: connect to host ???.1??1??.?? port 22: Connection refused\r\r\n’
match: None
match_index: None
exitstatus: None
flag_eof: True
pid: 2661219
child_fd: 5
closed: False
timeout: 3
logfile: None
logfile_read: None
logfile_send: None
maxread: 2000
ignorecase: False

what exactly you try to do? connect sftp to move account from CP to CP ? or Just Backup CP to CP or CP to server ? did you read the documentation?

As I told original post I try setup SFTP as backup destination. So I have storage space somewhere in big great internet, where I can connect every other SFTP client, ssh etc… But setting cyberpanel backup location fails with message on original post.
Can you link me documentation with solution?

please note, I’m not from CP support but I try help others and without more details I can’t help you so please wait someone from the support team

1 Like

Bump up any advice? So I can connect SFTP every other possible client but cyberpanel give error.

SFTP works very fine for me. I am using it to push backup files to my remote cyberpanel setup at oracle server. You maybe doing something wrong in configuring it.

I just cant figure out what goes wrong. If I have try use exactly same sftp credentials for filezilla, terminus and putty. Every where else I can login without any problem but not cyberpanel.

I have tried on 2 different cyberpanel installation on different VPS host. I managed connect one account what I made SSH user account on other cyberpanel and used those credentials. But with this backup location I use oracle free with ampere which run on ARM processor I cant install cyberpanel… With my oracle home region is Singapore and they not offer amd for free tier option.

I have enabled password login for backup user account in /etc/ssh/sshd_config and can login with out ssh key with putty etc… Is there way to use SSH keys for authenticate sftp backup location?

If you want I can create for you sftp user to test if you can find what I do wrong. I’m just getting frustrated I have 200gb free storage what I cant use…

How I can add known host manually cyberpanel give that as part of error? I tried just SSH to that server in hope it will be added known host. I even wiped out whole backup server and started fresh and still have same problem.

For adding user I use following commands if that is wrong way add can someone give link to right way to do it?
sudo adduser --shell /bin/false user

sudo mkdir -p /home/sftp/backup
sudo chown user:user /home/sftp/backup
sudo chown root:root /home/sftp
sudo chmod 755 /home/sftp

If some one can check is there something wrong with sshd config below:
Match User o???
ForceCommand internal-sftp
PasswordAuthentication yes
ChrootDirectory /home/backup
PermitTunnel no
AllowAgentForwarding no
AllowTcpForwarding no
X11Forwarding no

Cyberpanel will not work on ARM based server as lsphp by litespeed doesnt support it yet. When litespeed add support for ARM, then cyberpanel will eventually support it.

If you are trying in oracle, then they have their own firewall settings where you need to whitelist ports for sftp, ftp etc.

I will have a check and let you know how to do this step by step soon. Please give me sometime.

I know by trial cyberpanel wont install on ARM… I have opened all necessary ports on oracle firewall and set iptables on ubuntu. I can connect everything else fine to the server only cyberpanel give headache. I launched yesterday again fresh server to just see if that helps but no any luck.

I will have a check on new server and see if I could reproduce this issue.

Thanks. Meanwhile I have been playing with free server its not bad at all for performance. I have already set AApanel for testing WP site and in docker couple modded minecraft server for kiddo, those everything run like champ without braking sweat.
Just if I can somehow get SFTP problem solved that’s amazing server for FREE.

Check PM I have trial couple day left. I made test server if you want test on it