I want to copy from remote box with
scp, while the fact that each time I have to re-enter password is annoying. So I store my password in plain text and expect the following code should work
scp -Pport_num username@hostname:path_to_file local_path < passwd
After googling, I know this target can be achieved with the help of
expect but I can't figure out why input redirection will fail.
Thanks and best regards.