I suspect this is some misconfiguration on your server side. Due to the ticket's age, I'm closing. If the problem is still relevant, please reopen with detailed command line.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
So funny you just updated this 18 hours ago; I found this thread because I'm having the same issue today. Root login works fine; anything else hangs. strace shows the process is getting to the ssh/sftp password prompt just fine, then hanging there.
I'm using RHEL 6.6 i86_64. I'll post the straces for both the successful root login and the unsuccessful non-root one.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
David, please try the latest version from SVN. I changed the word used to detect password prompts from "assword:" to "assword" (that one always makes me laugh. I guess I do have common interests with my 4 y.o. daughter after all).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It will be Monday but I will do that. Not sure though why that would make a
difference for root vs. non-root, but if it works I'm not going to argue.
:) Thanks for the quick response.
It is possible your ssh client produces a different password prompt based on whether you are connecting as root or not, with the non-root prompt not being recognized by sshpass.
Whether working or not, I would appreciate it if you also posted both password prompts here, for future reference (i.e. - the output of running the ssh command without sshpass).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
View and moderate all "bugs Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Bugs"
I'm using the sshpass in the community repo for archlinux, if that provides any additional help
I suspect this is some misconfiguration on your server side. Due to the ticket's age, I'm closing. If the problem is still relevant, please reopen with detailed command line.
So funny you just updated this 18 hours ago; I found this thread because I'm having the same issue today. Root login works fine; anything else hangs. strace shows the process is getting to the ssh/sftp password prompt just fine, then hanging there.
I'm using RHEL 6.6 i86_64. I'll post the straces for both the successful root login and the unsuccessful non-root one.
David, please try the latest version from SVN. I changed the word used to detect password prompts from "assword:" to "assword" (that one always makes me laugh. I guess I do have common interests with my 4 y.o. daughter after all).
It will be Monday but I will do that. Not sure though why that would make a
difference for root vs. non-root, but if it works I'm not going to argue.
:) Thanks for the quick response.
Last edit: Shachar Shemesh 2015-04-25
It is possible your ssh client produces a different password prompt based on whether you are connecting as root or not, with the non-root prompt not being recognized by sshpass.
Whether working or not, I would appreciate it if you also posted both password prompts here, for future reference (i.e. - the output of running the ssh command without sshpass).
Shachar - here's the prompt we're getting from sftp as a non-root user, in context:
$ sftp -oPort=5222 cxxxt@xxx.xxxxus.com
Connecting to xxx.xxxxxus.com...
Enter passphrase for key '/home/xyzz/.ssh/id_rsa':
and here's the same thing but with ssh instead:
$ ssh -p 5222 cxxxt@xxx.xxxxxus.com
Enter passphrase for key '/home/xyzz/.ssh/id_rsa':
So those look the same. More to come.
oh, btw, the environment:
sh-4.1$ uname -a
Linux d3server.xyzz.org 2.6.32-504.16.2.el6.x86_64 #1 SMP
sh-4.1$ ssh -v
OpenSSH_5.3p1, OpenSSL 1.0.1e-fips 11 Feb 2013