How to get password prompt from scp when launched remotely via ssh

Posted by Zek on Server Fault See other posts from Server Fault or by Zek
Published on 2013-11-05T21:48:33Z Indexed on 2013/11/05 21:55 UTC
Read the original article Hit count: 246

Filed under:
|
|

When I ssh to a remote system and execute scp, I do not get a password prompt:

# ssh 192.168.1.32 "scp joe\@192.168.1.31:/etc/hosts /tmp"  
Permission denied, please try again.  
Permission denied, please try again.  
Permission denied (publickey,password,keyboard-interactive).

If I break it up like this, it works fine:

# ssh 192.168.1.32  
# scp joe\@192.168.1.31:/etc/hosts /tmp  
[email protected]'s password:

How can I make it prompt me for the password in the first example above?

Note: No, I cannot use key-based authentication for this.

© Server Fault or respective owner

Related posts about linux

Related posts about ssh