I have created a working script that I need to modify. The script is very simple.
cd /d path
echo put *.pdf | sftp user@ip_address.
del *.pdf
I'd like to find a way to do not write down the user inside the script, so system will request username and password, not only the password.
If it is not possible, it may work for my scope to find a way to setup a default user in the server so I do not write the username on the script and system will know the user.
Is there a way to connect to the host without entering the username, so system will request it?
If I enter just sftp ip_address
I will get back user@ip_address password:
where the user iss the local user from the client machine but it wont accept the password.
Thanks.