1834747 Members
2586 Online
110070 Solutions
New Discussion

Re: SSH Trust Request

 
Global Server Operation
Frequent Advisor

SSH Trust Request

SA is being asked to complete the following tasks. I would like to know what concerns if any and how would you suggest going about this. I have not experienced much with SSH before.


Tasks / Details
There needs to be a ssh/scp trusted relationships between the application server A and host FTP Depot ftp.xx.xx.xx.com to allow for a Bourne Shell script the ability to use ssh and scp to pull and push files to the FTP Depot in the directory owned by XXXXX@ftp.xx.xx.xx.com. The relationship needs to be set up to allow for no password prompts as it is script based.
With this trusted ssh key relationship established, the script should be able to use commands like [ ssh XXXXX@ftp.xx.xx.xx.com "cd ~; ls -1 " >> aTemp ] and [ scp indir/*TCR* XXXXX002@ftp.xx.xx.xx.com:Performing/Vendor/out ]


Thank You! All replies will be appreciated.
3 REPLIES 3
Xavier Gutierrez_2
Frequent Advisor

Re: SSH Trust Request

Dear VOM UNIX SysAdm

What you need to do is the following:
0.- Make sure /etc/openssh/sshd_config has the following line: PubkeyAuthentication yes
1.- Generate a public key as the application user under whom the scripts are going to be ran: ssh-keygen -t dsa -N "" (if you require passphrase, insert it in between of the "")
2.- ssh ftp.xx.xx.xx.com -l XXXXX
3.- mkdir -m700 .ssh
4.- touch .ssh/authorized_keys
5.- chmod 600 .ssh/authorized_keys
6.- exit
7.- cat $HOME/.ssh/id_dsa.pub | ssh XXXXX@ftp.xx.xx.xx.com "tee -a .ssh/authorized_keys"
8.- Test: ssh XXXXX@ftp.xx.xx.xx.com (and see if it asks for PW)

Regards,

XG.-

Global Server Operation
Frequent Advisor

Re: SSH Trust Request

Thank You!! I'll assign points before I close this thread.
Xavier Gutierrez_2
Frequent Advisor

Re: SSH Trust Request

Did it work for you?

Did you encounter any problems?

Regards,

XG.-