![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Hiding app window | amessbee | High Level Programming | 1 | 12-05-2006 11:03 AM |
| Apache, hiding the url | blesets | UNIX for Dummies Questions & Answers | 2 | 07-12-2005 02:08 PM |
| Hiding login/password in process! | ctcuser | UNIX for Dummies Questions & Answers | 5 | 05-19-2004 10:39 AM |
| Hiding an IP address | datopdog | IP Networking | 1 | 11-11-2002 07:18 PM |
| Hiding password from ps | sudojo | Shell Programming and Scripting | 7 | 04-04-2002 05:52 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hiding password for FTP in a script
Hi,
I have a simple script to ftp from unix to a mainframe to get and put files. Currently I have the password setup in a VARS file and dereference the var in my script. Doing it this way allws me to change the password in only one place but it is still viewable for many people. Is there any other way to hide the password for the ftp command? Thank you! |
|
||||
|
Hi Joey,
Thanks for the reply. In your example people will still be able to go to the VARS file and see the password. Are there any FTP specific param files that the password could be put it that would make it harder to find? In my internet search I saw some code use $PASSWORD$ but it was not explained. Thanks again! |
|
||||
|
Generate your keys with the command "ssh-keygen".. take all default values... you will see the following and it will create two files for you... the public and private keys... Code:
sethcoop@burn:~$ ssh-keygen Generating public/private rsa key pair. Enter file in which to save the key (/home/sethcoop/.ssh/id_rsa): Created directory '/home/sethcoop/.ssh'. Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in /home/sethcoop/.ssh/id_rsa. Your public key has been saved in /home/sethcoop/.ssh/id_rsa.pub. The key fingerprint is: 3c:58:48:6b:9e:9c:c3:72:1b:8f:a9:f8:a5:c4:31:29 sethcoop@burn sethcoop@burn:~$ cd .ssh sethcoop@burn:~/.ssh$ ls -al total 16 drwx------ 2 sethcoop sethcoop 4096 2008-10-24 12:16 . drwxr-xr-x 3 sethcoop sethcoop 4096 2008-10-24 12:15 .. -rw------- 1 sethcoop sethcoop 1671 2008-10-24 12:16 id_rsa -rw-r--r-- 1 sethcoop sethcoop 411 2008-10-24 12:16 id_rsa.pub sethcoop@burn:~/.ssh$ now you can take the contents of the id_rsa.pub file and add it to the /home/userid/.ssh/authorized_keys file on the remote server. Watch out for you permissions because they have to be correct.. ie (your home directory can only be user writable the .ssh direcotry should have 700 permissions and the authorized_keys file should have 600 permissions). when you have the public key shared the you can type in Code:
$ sftp userid@remotehost and it will log you in... hope this works... let us know if you have any troubles. |
![]() |
| Bookmarks |
| Tags |
| ssh automatic login |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|