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

Possibility to provide password through sshpass #9

Closed
gerbenvoshol opened this issue Feb 4, 2024 · 3 comments
Closed

Possibility to provide password through sshpass #9

gerbenvoshol opened this issue Feb 4, 2024 · 3 comments

Comments

@gerbenvoshol
Copy link

gerbenvoshol commented Feb 4, 2024

Hi, Thanks for writing this software. I performed an initial speed test and it provides an impressive increase versus scp and our normal parallel/rsync solution. For some of our transfers however, we require a user/passwd combination. Therefore we use sshpass. Unfortunately, this did not seem to work. Is it possible to provide the passwd through sshpass?

In the meantime, I tried some other tools and I noticed https://github.com/clarkwang/passh, can provide the passwd but sshpass still fails.

@upa
Copy link
Owner

upa commented Feb 5, 2024

Hi,

Thank you for using mscp!

sshpass doesn't work with mscp. sshpass intercepts in/out via tty because ssh does so. On the other hand, mscp's password prompt and input are through stdout and stdin. Please refer to Answer in this stack exchange post.

Anyway, I understand your use case. If mscp is capable of receiving password via an environment variable, would your needs be satisified? If so, I will add such a capability.

@gerbenvoshol
Copy link
Author

Thanks for your speedy reply! Definitely an environmental variable would work for us. Since passh also works as an alternative to sshpass the need for this option is not as high as say a resume option.

Thanks for all the great work!

upa added a commit that referenced this issue Feb 6, 2024
MSCP_SSH_AUTH_PASSWORD passes a password, and MSCP_SSH_AUTH_PASSPHRASE
passes a passphrase for publickey auth. They enable avoiding interactive
password input. Test cases are also added.
@upa
Copy link
Owner

upa commented Feb 7, 2024

Two env vars, MSCP_SSH_AUTH_PASSWORD and MSCP_SSH_AUTH_PASSPHRASE are added to pass a password for password auth and a passphrase for public key auth. New version v0.1.4 including this feature is released at Github, PPA, COPR, and homebrew.

@upa upa closed this as completed Feb 7, 2024
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

No branches or pull requests

2 participants