LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 03-14-2013, 05:09 AM   #1
peacepanda
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Rep: Reputation: Disabled
Auto ligin and command execution!!!


I have to always login into aix servers.What I want is to lgoin into to servers automatically i.e I dont want to always enter my credentials.I know this can be done using SSH but is there any other way to do this.Also I want to run some commands when I login.Can someone help me with examples or point me some documentaion on how this can be done.

Thanks,
Ajit
 
Old 03-14-2013, 05:16 AM   #2
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
First thing is that, though login without a password is possible (ofcourse using password less ssh), but without username it's not possible! (since you mentioned to login into server without entering credentials.)

Let's know how are you accessing your server - locally using GUI or remotely using ssh or similar protocol?
 
Old 03-14-2013, 05:28 AM   #3
peacepanda
LQ Newbie
 
Registered: Oct 2012
Posts: 26

Original Poster
Rep: Reputation: Disabled
Question

HI Shivaa,
I am accessing the remote servers using putty from my local machine using protocols like SSH and telnet.Agreed I do have to enter the username but once I enter the username I want the password to be entered automatically and couple of commands that should follow

Regards,
Ajit
 
Old 03-14-2013, 05:45 AM   #4
shivaa
Senior Member
 
Registered: Jul 2012
Location: Grenoble, Fr.
Distribution: Sun Solaris, RHEL, Ubuntu, Debian 6.0
Posts: 1,797
Blog Entries: 4

Rep: Reputation: 285Reputation: 285Reputation: 285
One option is password less login using ssh public keys, in which you will be able to login without entering a password and can invoke any commands on remote server, like:
Code:
~$ ssh -l username hostname.example.com "some_command"
OR
~$ ssh username@hostname.example.com "some_command"
 
  


Reply

Tags
aix, auto, scripting


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
Only execute 2nd command on successufl execution of 1st command kregec05 Linux - Newbie 3 08-19-2009 11:29 AM
lock-keys-applet auto execution at startup dewittm LinuxQuestions.org Member Intro 0 03-15-2009 12:15 AM
auto execution of script on ubuntu when user login Mr.J Ubuntu 2 07-04-2008 06:04 AM
Mandrake Localhost ligin prob terracious Linux - Newbie 2 10-24-2005 03:22 AM
auto execution script nimrod Linux - General 2 12-09-2002 04:20 PM


All times are GMT -5. The time now is 04:42 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration