LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 01-17-2007, 01:21 AM   #1
Sulman Shah
Member
 
Registered: Oct 2006
Posts: 38

Rep: Reputation: 15
Bypassing password in remote login


When I run my program for logining remotely it's prompting me for password, is there any way so, that I can use in my source code to login to a host2 from host1 just by bypassing password.

>>>>>>system("user@host1");

In the terminal it will ask me for password which looks like

>>>>>>>user@host1's password:

So my question is can i do it in my code? I mean to say entering password and then login remotely.
 
Old 01-17-2007, 01:35 AM   #2
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
If you are using ssh, you can do it by setting up public key authentication.
 
Old 01-17-2007, 05:42 AM   #3
Sulman Shah
Member
 
Registered: Oct 2006
Posts: 38

Original Poster
Rep: Reputation: 15
but again we will be prompted for the passphrase instead of password. Can we enter passphrase in our source code? if yes then how?
 
Old 01-17-2007, 09:25 AM   #4
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
No, using public key auth you don't need to provide a pass phrase. You can optionally have a pass phrase to locally protect your private key, and if you have this, you need to provide this. However, you can either not have a local key-protecting passphrase, or you can cache it using ssh-agent, in which case you only enter it once, and then it is memory until the agent process is reset.
 
  


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
Logon (telnet) to RedHat ES 3.0 bypassing password amutrl Linux - Newbie 2 05-18-2005 07:12 AM
remote login no password FC2 dretzloff Linux - Security 1 01-08-2005 05:11 PM
Bypassing GDM/getting a text login antizero Linux - Newbie 9 10-14-2004 06:20 AM
Bypassing grub password at165dB Linux - General 1 05-26-2004 10:20 AM
Slackware 2.4.22 remote root login no password jerry950 LinuxQuestions.org Member Success Stories 3 02-09-2004 01:40 PM


All times are GMT -5. The time now is 01:56 PM.

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