LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   remote command over ssh, password prompt (https://www.linuxquestions.org/questions/linux-general-1/remote-command-over-ssh-password-prompt-33843/)

linowes 10-26-2002 02:23 PM

remote command over ssh, password prompt
 
Hi,
I can run a remote command over ssh from the command line, but it always prompts me for a password on the remote machine. I want to execute this command from a script when I log in. How can I avoid the password: prompt?

ssh myserver '/usr/bin/rp3 -i ppp0 &'
jonathan@myserver's password:

Also, it seems to get confused when I add an "&" to run it in background, such as

ssh myserver '/usr/bin/rp3 -i ppp0 &' &
jonathan@myserver's password:
secret
bash: secret: command not found

[2]+ Stopped ssh myserver '/usr/bin/rp3 -i ppp0 &'

it seems to interpret my password as a new command?
thanks,

acid_kewpie 10-26-2002 02:57 PM

the onjly way you can get round a password (or rather the only legitimate way) is to set up an authorisation key for your client on the host, either rsa or dsa. this will mean that a sizeable digital key will be passed to the server, autonegotiating the login... you seem to have hit on a rather bizarre way to do what you seem to want to do though.

linowes 10-27-2002 08:22 PM

>> you seem to have hit on a rather bizarre way to do what you seem to want to do though.

here's what I want to do: I have a linux server setup with a ppp dialup connection to my ISP. I want to monitor the ppp connection from my linux workstation. The only way I could figure out to do this, is to run /usr/bin/rp3 on the server and have it Xforward the graph to my desktop. I've been doing this manually by ssh'ing into that machine and then running the command. Now I want to automate the setup so it is running whenever I log in to my desktop.
Can you suggest another way?
thanks,
jonathan.


All times are GMT -5. The time now is 06:31 PM.