Additionally, ssh reads ~/.ssh/environment, and adds lines of the format
“VARNAME=value” to the environment if the file exists and users are
allowed to change their environment. For more information, see the
PermitUserEnvironment option in sshd_config(5).
Sooo, just before ssh-ing, you could create a new environment file:
but make sure PermitUserEnvironment is enabled in sshd_config on server side.
found that passing (input) values to awk, all work well. For example:
errpt | awk 'BEGIN { errore=0 }
substr($2,1,4) /'ParamData'/ {
....
} ' ParamData=`date +"%m%d"`
Now I wish to obtain (output) a value. Using this method is it possible to re-write ParamData, for example?
Thanks in... (3 Replies)
Wondering if this is possible?
OK, here is my question. I'm backing up a TON of different logs in different locations. I'm querying a database for the information. What I'd like to do, is pass that information into a logrotate script for the backup..
i.e. I'm trying to do the following:
... (1 Reply)
Dear All,
Can anybody explain me how to pass the variable value to command argument which will execute in remote machine.
example..
test="test-123.dbf"
how can i pass this value to command ls -l for remote machine?
I tried to do like this way
ssh root@remote 'ls -l... (2 Replies)
i have a bash script on serverA, when i run the script on the server, it runs fine. the way to run the script is like this ./script "option1"
Now i am trying to call it from local laptop using ssh command, my command is as the following
ssh serverA ~/script "option1"
and i got error... (7 Replies)
Hi,
I have 1. lappy
2. server A
3. server B
Now, what i need is to run a command from lappy that will sftp a file from server A to server B.
Please guide me to achieve this.
-akash (1 Reply)
I know multiple values can be returned from a function in C like this:
char **read_file ( char * , unsigned long int * );//this is the function prototypeunsigned long int number_of_words = 0;//variable defined in main() and initialized to 0words_from_dictionary = read_file ( "dictionary.dit" ,... (2 Replies)
Hi,
My script will take 3 i/p's from user. Now i need to pass these 3 values to remote server. Please find my code.
while
do
echo " To which server you want to connect ? "
echo " 1. server1 \n"
echo " 2. server2 \n"
read opt_server
if
then
echo "enter the... (2 Replies)
I am trying to connect to Windows server via Linux server through a script and run two commands " cd and ls " But its giving me error saying " could not start the program" followed by the command name i specify e g : "cd"
i am trying in this manner "
ssh username@servername "cd... (5 Replies)
Hello Every one!!
I am trying to write a shell script which will connect to a remote server and execute scripts which are at a certain path in the remote server.
Before this I am using a sudo command to change the user.
The place where I am stuck is, I am able to connect to the... (6 Replies)
I have a script, which connecting to remote server and first checks, if the files are there by timestamp. If not I want the script exit without error. Below is a code
TARFILE=${NAME}.tar
TARGZFILE=${NAME}.tar.gz
ssh ${DESTSERVNAME} 'cd /export/home/iciprod/download/let/monthly;... (3 Replies)
Discussion started by: digioleg54
3 Replies
LEARN ABOUT ULTRIX
rpc_allow_remote_shutdown
rpc_allow_remote_shutdown(3ncs)rpc_allow_remote_shutdown(3ncs)Name
rpc_allow_remote_shutdown - allow or disallow remote shutdown of a server (server only)
Syntax
#include <idl/c/rpc.h>
void rpc_$allow_remote_shutdown(allow, checkproc, status)
unsigned long allow;
rpc_$shut_check_fn_t checkproc;
status_$t *status;
Arguments
allow A value indicating `false' if zero, `true' otherwise.
checkproc A pointer to a Boolean function.
status The completion status. If the completion status returned in is equal to status_$ok , then the routine that supplied it
was successful.
Description
The routine allows or disallows remote callers to shut down a server using
By default, servers do not allow remote shutdown via If a server calls with allow true (not zero) and checkproc nil, then remote shutdown
will be allowed. If allow is true and checkproc is not nil, then when a remote shutdown request arrives, the function denoted by checkproc
is called and the shutdown is allowed if the function returns true. If allow is false (zero), remote shutdown is disallowed.
Diagnostics
This section lists status codes for errors returned by this routine in
rpc_$not_in_call An internal error.
rpc_$you_crashed This error can occur if a server has crashed and restarted. A client RPC runtime library sends the error to the server
if the client makes a remote procedure call before the server crashes, then receives a response after the server
restarts.
rpc_$proto_error An internal protocol error.
FilesSee Alsointro(3ncs), rpc_shutdown(3ncs), rrpc_shutdown(3ncs)rpc_allow_remote_shutdown(3ncs)