![]() |
|
|
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 |
| how do I make my workstation an installation server for a remote server?. | calsum | SUN Solaris | 3 | 04-18-2008 04:54 PM |
| Script for automatic deletion of trash file of mail server | crown2100bd | SUN Solaris | 1 | 09-20-2007 09:01 AM |
| Transfer file from local unix server to remote server | indira | Shell Programming and Scripting | 2 | 05-03-2007 07:35 AM |
| Transfer file from local unix server to remote server | indira | HP-UX | 2 | 05-02-2007 06:15 PM |
| FTP multiple files from remote server to local server | berlin_germany | Shell Programming and Scripting | 2 | 12-20-2006 03:24 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
automatic ssh into remote server using ksh
I still have to enter the password when I want to auto login w/o having to do any command line entry. This code works but I don't want to have to enter the password at the command line. After manning ssh I still am not sure what settings I need to change. Please help. Thanks!
<<<output>>> $ sh file_exists.ksh clport@dwebapp1's password: file exists <<<code>>> #!usr/bin/sh hostname=dwebapp1 login_name=clport # password= if [ -n `ssh -l $login_name@$hostname 'ls test/testfile.txt 2>/dev/null'` ]; then echo file exists else echo "file doesn't exist"; fi |
|
||||
|
i suggest you to use "expect"
for details man expect try these site http://expect.nist.gov/ http://www.io.com/~wazmo/expect.htm |
|
||||
|
I set up my keys using ssh-keygen ; copied the key to .ssh/authorized_keys on the remote server. Logged out, logged in and exicuted the script at the beginning of this post and I still was forced to enter command line password. ARGH! I don't understand what I am doint wrong.
The authenticity of host 'dwebapp1 (57.2.20.1)' can't be established. . key fingerprint is RSA. Are you sure you want to continue connecting (yes/no)? y Please type 'yes' or 'no'. yes Warning: Permanently added 'dwebapp1,57.2.20.1' (RSA) to the list of known hosts. clport@dwebapp1's password: file exists $ ksh file_exists.ksh clport@dwebapp1's password: |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|