|
From: | janeitzey |
Subject: | Login to remote server without coding passwords |
Date: | Tue, 14 Jan 2014 05:08:08 -0800 (PST) |
User-agent: | G2/1.0 |
Is there a way to log into a server without using passwords coded into the script? I'm trying to retrieve files from a server for every computer I have based on the serial number of the machine. This is what I have so far. (I'm very new to bash. Any advice would be helpful) #!/bin/sh myserial=ioreg -l |grep IOPlatformSerial|cut -d "\"" -f 4 copyPath=~/pathhere destinationPath=/pathhere copyPath2=~/pathhere destinationPath2=/pathhere <NEED LIGIN/PASSWORD ADVICE HERE> scp user@host:$copyPath/$myserial.pem $destinationPath/ scp user@host:$copyPath2/$myserial.pem $destinationPath2/ exit 0
[Prev in Thread] | Current Thread | [Next in Thread] |