Monday, December 20, 2010

Get user id on a remote server

you have to use SSH public/private key pairs to make this work.

#!/bin/bash
uid=`ssh <your.server> 'id -u'
echo $uid

more stuff here http://bashcurescancer.com/run_remote_commands_with_ssh.html

No comments:

Post a Comment