LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-13-2009, 11:58 AM   #1
vijayan361
LQ Newbie
 
Registered: May 2008
Posts: 3

Rep: Reputation: 0
Question 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!!
 
Old 01-13-2009, 12:28 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
Old 01-13-2009, 06:04 PM   #3
GaijinPunch
Member
 
Registered: Aug 2003
Location: Tokyo, Japan
Distribution: Gentoo
Posts: 130

Rep: Reputation: 22
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.
 
Old 01-14-2009, 03:03 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Quote:
Originally Posted by GaijinPunch View Post
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.
 
Old 01-14-2009, 10:19 AM   #5
vijayan361
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 01-14-2009, 10:50 AM   #6
baig
Member
 
Registered: Nov 2008
Location: وادی ھنزہ
Distribution: Solaris 5.10, Debian Server 5.2, CentOS 5.6
Posts: 226
Blog Entries: 3

Rep: Reputation: 38
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!!

Last edited by baig; 01-14-2009 at 10:51 AM.
 
Old 01-23-2009, 06:15 AM   #7
vijayan361
LQ Newbie
 
Registered: May 2008
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 01-23-2009, 06:42 AM   #8
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Automation task script itmeok29 Linux - Newbie 4 05-15-2008 10:12 AM
LUKS automation script jippo Linux - Security 6 01-12-2008 12:56 AM
Telnet automation script senthilvael Linux - Newbie 15 11-19-2007 04:38 PM
User automation Script Pigdog Linux - Networking 1 02-26-2003 02:01 PM


All times are GMT -5. The time now is 08:19 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration