Hi,
I have an scenario to sftp the files using Admin Id (user--> mhvsftp). But there are 5 other users (call it as 'businessuser1, businessuser2, etc.'). User "businessuser1" can able to login through his id and will execute the sftp script using mhvs
ftp. (FYI, using 'mhvsftp' user the key pair is generated and shared with external vendor External.
ftp.com).
I have tried to acheive the same by the following method.
Step 1: Created a ".externalvendor_sftp" file using user mhvs
ftp.
Step2 : Edited teh file ".externalvendor_sftp" to have the following
FTPSTRING=External.
ftp.comUSERNAME=mhvsftp
PASSWORD='happy$1
Step3: Inside my sftp script i have entered the following to execute through mhvsftp user (even thoug i executes through businessuser1)
ENVFILE=/mhvsftp/home/.ext
ernalvendo
r_sftp
. $ENVFILE
sftp $FTPSTRING user $USERNAME using $PASSWORD
Please let me know the sftp option to acheive this.