20110531

ssh can be used in while or for loop

-n Redirects stdin from /dev/null (actually, prevents reading from stdin). This must be used when ssh is run in the background. A common trick is to use this to run X11 programs on a remote machine. For example, ssh -n shadows.cs.hut.fi emacs & will start an emacs on shadows.cs.hut.fi, and the X11 connection will be automatically forwarded over an encrypted channel. The ssh program will be put in the background. (This does not work if ssh needs to ask for a password or passphrase; see also the -f option.)

ssh do not display motd

Use quite option:

ssh -q host

Semaphores exhausted: OS support please check: 0 semaphores available.

//Solaris 10:

# expr `ipcs -s | wc -l` - 3
you will get the current number of semaphores ids

# prctl -n project.max-sem-ids $$
the maximum limit is the privileged value

Temporarily increase the value to double
# prctl -n project.max-sem-ids -v 256 -r -i project default


//Solaris 9:
The default semmni value (max sem ids) is 10. Set the new value in the /etc/system and reboot is compulsory.

# expr `ipcs -s|wc -l` - 3
you will get the current number of semaphores ids

sshd[#]: [ID 800047 auth.error] error: Failed to allocate internet-domain X11 display socket

Check your $DISPLAY.

echo $DISPLAY

Should be like localhost:10.0

10 could be 11 12 13 etc

If you dont see that, check where $DISPLAY value comes from

grep DISPLAY ~/.*

try commented it out

if still not work try google somewhere else, u may find

1. plumb the ip6 localhost
2. use sshd -4 (edit /lib/svc/method/sshd for solaris 10)
3. Change ListenAddress in sshd_config from :: to 0.0.0.0

Hmm I dunno.. good luck

20110503