Script Problem: ssh user@server <command>

Hay,

I want to login from my first root to my second root and execute a command like this:

Code:
ssh root@<hostname> "cd /usr/ports/databases/mysql50-server && make install clean"

The problem is, I do not get the 'dialog' to enter 'ok' or 'cancel' to begin or abort the installation.
Because it is very important to install this from my first root on my second root.
Please help.
 
hi, you can try use
Code:
BATCH=yes
Code:
ssh root@<hostname> "cd /usr/ports/databases/mysql50-server && make BATCH=yes install clean"
 
Also check the ssh(8) page for a description of the -t option.

And disable root logins via ssh. You really don't want to do that. Install security/sudo and configure that to allow a non-root user to execute things as root.
 
phoenix said:
Also check the ssh(8) page for a description of the -t option.

And disable root logins via ssh. You really don't want to do that. Install security/sudo and configure that to allow a non-root user to execute things as root.

Sure i'll do that.
But first i had to check how that works with my problem ;) i only use normal accounts and private keys for ssh login.
 
Back
Top