We have a process that is using a working secured port using this scp command like so:
/usr/bin/scp -P 1234 -i /path/key_rsa /home/path/filename.txt user@remotehost:/tmp
I'm working on a schell script, that will use ssh, but not sure how to use that same port of 1234.
I tried /usr/bin/ssh -D 1234 remotehost '. ~/my_profile; mkdir /test' and its asking for the user pw. I know the keys are already established since the scp works fine for that user.
What am I doing wrong? Thanks.