So, I'm trying this:
ssh -t -e none host "sudo cat /location/to/some/file.txt" | xclip -selection c
-t option, i'm supposed to get password prompt for
sudo. But, I'm not. Without it, well permission denied.
What I'm getting for sudo prompt, with -t option, is a new line, where I tried entering the sudo password, but nothing happens and after a little while it drops saying
Connection to host closed.
Is there any other way (using terminal only) around to copy a protected file from a remote machine to local.
@Félicien is right. The
ssh is masked because of the pipe
|. The password-asking-prompt will also go through the pipe and change the input of