LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Invoking a programme on a remote machine, bypassing the unix authentication process.` (https://www.linuxquestions.org/questions/linux-newbie-8/invoking-a-programme-on-a-remote-machine-bypassing-the-unix-authentication-process-%60-652721/)

sk_brahma2008 06-30-2008 11:46 PM

Invoking a programme on a remote machine, bypassing the unix authentication process.`
 
I am using SunOS5.6 both on my local and remote machine. I wanted to invoke a script on my remote machine bypassing the remote machines authentication. I want to bypass the default authentication because my script on the remote machine has the customized login screen and it will authenticate the user. So i dont want the user to go through 2 round of authentication(once for default authentication and another for application authentication). How can i achieve this. Also after the execution of the script on remote machine is completed, i want to come back to my local machine. How do i do this.

w3bd3vil 07-01-2008 01:19 AM

You would probably need to find a remote root exploit for this. :p
I dont think there is a way you could do this unless you remove the authentication yourself for everyone.

On the other side, it wouldnt be so tough to build a program to do multiple logins for you. Give that a try.

emi_ramo 07-01-2008 03:59 AM

Hi,
You can use SSH to connect to the remote machine and add the DSA or RSA key to the authorized_keys file so you won't need to type your password every time you connect:

Code:

ssh-keygen -t dsa
sftp user@server
[enter password]
sftp> cd .ssh
sftp> put id_dsa.pub
sftp> exit
ssh user@server
[enter password]
user@server# cd .ssh
user@server# cat id_dsa.pub >> authorized_keys
user@server# exit
ssh user@server
[no need of any password]

And if you need to execute an X app on server but control it on the local machine, do:
Code:

ssh -X user@server
And if you want to execute an script directly:
Code:

ssh -X user@server /path/to/script
Have fun!!
emi

emi_ramo 07-01-2008 06:17 AM

Are you using telnet? If that's true, in my opinion, it's a huge lack of security...
To do that you'll need ssh daemon to be running. Once installed, authorized_keys is at /home/user/.ssh/ .
An advice: once you've created the key, rename the public key to something similar to id_dsa.user@machine.pub so you don't overwrite other keys.

emi

emi_ramo 07-01-2008 06:18 AM

(duplicated post)


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