TABLE OF CONTENTS
::pwtk::can_connect
SYNOPSIS
proc ::pwtk::can_connect {user_at_host} {
PURPOSE
Check if user can connect to 'user_at_host'.
ARGUMENT
- user_at_host ... a host specs where to connect (either user@hostname.domainname, hostname.domainname, or hostname)
RETURN VALUE
- 1 ... if user can connect to 'user_at_host'
- 0 ... otherwise
SOURCE
if { [catch {exec -ignorestderr {*}$::pwtk::remote(rsh) {*}$::pwtk::remote(rsh_alive_opts) $user_at_host exit}] } { return 0 } else { return 1 } }