var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
I am trying to make a connection to a remote machine using the "login" command. I want to use this in a script but i am not able to make out how i would provide the password required for it.
i was just wondering is there is any option in login command thats lets me pass the password in the command line itself.
or something like
# echo "mypassword" | login -h myserver.com
# login -h myserver.com < mypasswordfile.txt
Can anyone help me in this.
You can do this way
If you want o ftp Or Login
1.write the below line in a test.sh file
ftp -nv XXX.XXX.XXX.XX ( Ipaddress or hostname, ftp or telnet)
2.and create test1.txt file with the login information
user username password
3. execute this line
/fullpath/test.sh < /fullpath/test1.txt
I hope this works for you
I guess you should use
rexec instead; you can't login to a remote host using login. Read rexec's manual page to learn how to specify remote user name and password using .netrc file.
hey guys thanks for the prompt reply...
well i am not going for FTP instead wanted to login into remote machine using a script....i had used rlogin for such a thing but was wodnering if we can do it the other way without having to edit the /etc/hosts file and the like.
anyways thanks a lot pals....