LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Automation script (https://www.linuxquestions.org/questions/linux-newbie-8/automation-script-697035/)

vijayan361 01-13-2009 11:58 AM

Automation script
 
How can i automate login into another virtual machine, which i created now.
I want to login without asking passsword!
and i am using openvz for virtualisation!!

acid_kewpie 01-13-2009 12:28 PM

login how? ftp, telnet, ssh, sftp, http, xdmcp, vnc....? if you wnt help you need to provide a suitable level of information. From cold I could guess at ssh, and therefore say you shouldn't automate it, but use preshared keys to get in securely without passwords.

GaijinPunch 01-13-2009 06:04 PM

Not sure what openvz is. If you want something to start when your computer starts, then make an rc script. Not a very secure solution though.

acid_kewpie 01-14-2009 03:03 AM

Quote:

Originally Posted by GaijinPunch (Post 3407634)
Not sure what openvz is. If you want something to start when your computer starts, then make an rc script. Not a very secure solution though.

This doesn't appear to have any relation to the question being asked.

vijayan361 01-14-2009 10:19 AM

i want to use ssh.
The thing is i will create a virtual machine on my near by machine.
Now i want to login.
before copy my public key , i have to use password to copy from my system to that vm.
How can i supply password in my script?

Let me put in this way..
is there any command in linux, so that i may use it to login my remote system by supplying both user name and password in a single line

baig 01-14-2009 10:50 AM

Have you tried to copy you public key to your the other computer using

the script you are looking for copying your public key to your server is:

Code:

ssh-copy-id -i ~/.ssh/your_public_key user@your_machine_id

but you have to enter your password once manually;). Then all you have to do is disable passwordauthenticaton=no in /etc/ssh/sshd.conf file and enable publickeyauthenticaion=yes

or

man ssh-copy-id

Hope you were asking the same with i have mentioned.


cheers!!

vijayan361 01-23-2009 06:15 AM

where can i find public key authentication
And i am using fedora 9

i want to log into the system by supply the password in the same line is it possible

something like

acid_kewpie 01-23-2009 06:42 AM

As above, you should look to use public key authentication. If you don't know what this is, then have a read online via google.


All times are GMT -5. The time now is 12:16 PM.