Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix v-add-backup-host for sftp servers with different login prompt #2950

Merged
merged 2 commits into from
Oct 4, 2022

Conversation

gdarko
Copy link
Contributor

@gdarko gdarko commented Oct 3, 2022

On a FreeBSD hosted sftp server, the password prompt looks different. Example: Password for user@host:

This pull-request fixes the issue.

  1. Full SFTP login prompt fom the HestiaCP server
root@host1:/usr/local/hestia/log# /usr/bin/sftp -o StrictHostKeyChecking=no -o Port=22 uploads@XX.XXX.XXX.XXX
Password for uploads@backupserver:
Connected to XX.XXX.XXX.XXX.
  1. FreeBSD SFTP configuration in /etc/ssh/sshd_config
Match Group sftponly
    ChrootDirectory /usr/home/%u
    AllowTcpForwarding no
    X11Forwarding no
    ForceCommand internal-sftp
  1. FreeBSD version
root@backupserver:~ # freebsd-version
13.0-RELEASE-p13
  1. FreeBSD sshd version
root@backupserver:~ # sshd -v
OpenSSH_7.9p1, OpenSSL 1.1.1k-freebsd  24 Aug 2021

… prompt

On FreeBSD hosted sftp server, the password prompt looks something like this: "Password for: user@host:". This case was not handled so far.
Copy link
Member

@jaapmarcus jaapmarcus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also adjust

/func/backup.sh then

@gdarko
Copy link
Contributor Author

gdarko commented Oct 3, 2022

Good catch. This is now done @jaapmarcus

@jaapmarcus jaapmarcus self-requested a review October 3, 2022 08:14
Copy link
Member

@jaapmarcus jaapmarcus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have FreeBSD server running...

@jaapmarcus jaapmarcus merged commit 88dc8f0 into hestiacp:main Oct 4, 2022
@gdarko gdarko deleted the sftp-backup-hotfix branch October 4, 2022 15:40
@gdarko gdarko restored the sftp-backup-hotfix branch October 4, 2022 15:40
@gdarko gdarko deleted the sftp-backup-hotfix branch October 4, 2022 15:40
jaapmarcus added a commit that referenced this pull request Oct 5, 2022
…2950)

* Fix v-add-backup-host for sftp server that outputs different password prompt

On FreeBSD hosted sftp server, the password prompt looks something like this: "Password for: user@host:". This case was not handled so far.

* Fix sftp backup procedure for servers with different login prompt
@jaapmarcus jaapmarcus mentioned this pull request Oct 5, 2022
jaapmarcus added a commit that referenced this pull request Oct 5, 2022
* Fix issue with incorrect merge

* Fix bug v-change-web-domain-name

* Fix Quick installer issues (#2921)

* Some rare cases version might be empty

* Remove debug info

* If admin is not created status is not set

* Return correct status code

* Fix docuwiki installer

Install dir got changed due to new version

* Update to 2022-07-31a

See CVE-2022-3123

* Update opencart

* Use correct folder

* Update prestashop

* Fix few small bugs related to host ssl (#2922)

* Fix issue when ssl for domain allready exists

It seems USER_DATA was not properly loaded

root@dev:/usr/local/hestia/ssl# v-add-letsencrypt-host
cat: /usr/local/hestia/data/users//user.conf: No such file or directory
grep: /usr/local/hestia/data/users//web.conf: No such file or directory
grep: /usr/local/hestia/data/users//web.conf: No such file or directory
grep: /usr/local/hestia/data/users//web.conf: No such file or directory
Error: nginx restart failed
Error: nginx restart failed
Error: Let's Encrypt SSL creation failed

* No need to restart web / proxy service

Only Hestia, mail and ftp get updated

* Fix bug for modphp setups

* Merge pull request #2924 from jaapmarcus/fix/allow-more-chars-for-name

is_name_format_valid is only used for the name

* Merge pull request #2925 from hestiacp/jaapmarcus-patch-1

When restart is not set it should reload instead restart

* 2788 [Bug] Quick install Wordpress other languages then EN (#2818)

* Update changelog [CI SKIP]

[CI SKIP]

* updated jquery to v3.6.1 (#2932)

* Update changelog

* Fix #2943 for release branch

* Update changelog

* Update version

* Quick installer: Use the MediaWiki 1.38.4 (#2948)

See https://lists.wikimedia.org/hyperkitty/list/mediawiki-announce@lists.wikimedia.org/thread/DMQKMFSH4K7KLBXWZTDBGI2PWLLHJHJZ/

* Add support for Kurdish Sorani

@qezwan

* php version bump

* Add check if email is valid (#2944)

* Allow the use of (#2951)

v-add-remote-dns-host dev.xxxx.xxx 8083 'xxxxxxxx' '' '' "newuser"

* Add support for Kurdish Sorani (#2945)

@qezwan

* Fix v-add-backup-host for sftp servers with different login prompt (#2950)

* Fix v-add-backup-host for sftp server that outputs different password prompt

On FreeBSD hosted sftp server, the password prompt looks something like this: "Password for: user@host:". This case was not handled so far.

* Fix sftp backup procedure for servers with different login prompt

* Update changelog

* Small changes Changelog

[skip_ci]

* Update versions

Co-authored-by: Raphael <rs@scit.ch>
Co-authored-by: Alber Khan <39749258+4183r@users.noreply.github.com>
Co-authored-by: Zoran Dori <zorandori4444@gmail.com>
Co-authored-by: Ice Lake <30789544+istiak101@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants