Sponsored Content
Operating Systems HP-UX Coping filies from Linux Server to HP-UX Server Post 49831 by cgege on Monday 12th of April 2004 09:51:33 AM
Old 04-12-2004
Coping filies from Linux Server to HP-UX Server

I intend to copy file from a linux server (named zambezi) to a hp-ux (named mocuba).
When I execute the command #rcp -rp zambezi:/etc/hosts /u2 /
I receive the following message
rcmd: connect: zambezi: Connection refused
when I execute the command in the linux to copy from the HP-UX I obtain the following message
remshd: Login incorrect.
I ask for help

Regards
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Coping files from server to local

This is my first post, so first I'd like to say hello to everyone. Here's the issue I'm having...I run a macro against multiple log files every morning. The procedure is sort of time consuming. I have to log into the box where there are stored, then ftp/download them to my local drive using... (3 Replies)
Discussion started by: jhofilena
3 Replies

2. UNIX for Advanced & Expert Users

Shutdown the Linux server if no one is using the server

Hi All, I want to shutdown the server if no one is actualy using it. Its a linux server. I thought of sending a msg on users terminal for those who all are logged in and expecting a input from them. If they will reply system should not get shutdown else it should not. Can any one... (2 Replies)
Discussion started by: Sadhana
2 Replies

3. Linux

How often does Linux NTP server update its time with the external NTP server?

All here, thank you for listening. Now I've set up a Linux NTP server by adding a external windows NTP server in /etc/ntp.conf. Then I start the ntpd daemon. But how often does the Linux NTP server update its time with the external NTP server? I've looked up everywhere but found no information... (1 Reply)
Discussion started by: MichaelLi
1 Replies

4. Red Hat

microsoft Server 2008 Active authentication to a linux server

Hi, Please could someone advise I'm trying to use winscp from a Window server 2008 R2, but i need to add the authentication key to access the linux rh 5.4 servers ? What is the best way of approaching this ? If there are any web links that could help me do this, that would be good. ... (1 Reply)
Discussion started by: venhart
1 Replies

5. Shell Programming and Scripting

Copy folder and files from unix server to linux server

We would be migrating unix solaries to Linux redhat. Basically source is unix and target is linux. i would like to copy entire file system unix/source/* to target linux/souce/* but target linux has only folder setup so what ever files copied need to be placed in the linux server with same... (8 Replies)
Discussion started by: balajikalai
8 Replies

6. Shell Programming and Scripting

Connect (SSH) to Windows server via Linux server through a script and passing command.. but failing

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)
Discussion started by: sunil seelam
5 Replies

7. Shell Programming and Scripting

Copy files from Linux server to Windows server

Hi All, I am generating report in a Linux server and once the report is generated the report(.txt file) needs to be automatically saved in a Windows servers. So i am looking for a script to transfer the file automatically from Linux server to Windows server? Please advise. Thanks... (3 Replies)
Discussion started by: arunmanas
3 Replies

8. Homework & Coursework Questions

Configure the AD Window server with Linux server(google Authenticator is installed)

Hi my name is Manju. ->I have configure the two way authentication on my linux server. ->Now I am able to apply two way authenticator on particuler user. ->Now I want to map this linux server to my AD server. ->Kindly tell me how to map AD(Active Directory) with this linux server. ... (2 Replies)
Discussion started by: manjusharma128
2 Replies

9. Linux

How to connect Linux server (configure two way authentication) with Windows server?

Hi my name is Manju. ->I have configure the two way authentication on my linux server. ->Now I am able to apply two way authenticator on particuler user. ->Now I want to map this linux server to my AD server. ->Kindly tell me how to map AD(Active Directory) with this linux server. ... (0 Replies)
Discussion started by: manjusharma128
0 Replies

10. Windows & DOS: Issues & Discussions

Passwordless login from Linux server to windows server

Hi, I am a newbie and has been given a task to connect to a windows server from a linux server (using putty of course; for file transfer) that too passwordless. Searching through google I found "ssh-keygen" but this also couldn't work because as I tried ssh <username>@<windowsServerIP>, it says... (5 Replies)
Discussion started by: pratria
5 Replies
rcmd(3N)																  rcmd(3N)

NAME
rcmd(), rcmd_af(), rresvport(), rresvport_af(), ruserok() - return a stream to a remote command SYNOPSIS
DESCRIPTION
rcmd() The function is used by privileged programs to execute a command on a remote host. returns a file descriptor for the socket to which the standard input and standard output of the command are attached. A command level interface to is provided by (see remsh(1)), which is the same as the BSD command. ahost is a pointer to the address of the remote host name. The name of the remote host can be either an official host name or an alias as understood by (see gethostent(3N), named(1M), and hosts(4)). remport is the Internet port on the remote system, which will try to connect to. locuser and remuser point to the user login name on the local host and on the remote host, respectively. The names are used by the server on the remote host to authenticate the user (see below). cmd points to a string that specifies the command to be executed on the remote host. fd2p is a pointer to an integer (it can be a NULL pointer). looks up the host using returning -1 if the host does not exist. Otherwise, is set to the standard name of the host and a connection is established to a server accepting requests at the port remport. If the connection is refused after five tries, or if it was refused for a reason other than the port being in use, returns -1. If the call succeeds, a socket of type SOCK_STREAM is returned to the caller and given to the remote command as and If fd2p is non-NULL, opens a second socket between the calling process (local) and the control process (remote), and places its descriptor in On this connec- tion, the control process sends the diagnostic output from cmd to the calling process, and receives UNIX signals from the calling process, to be forwarded to cmd. If the auxiliary port cannot be set up, returns -1. If fd2p is NULL, of the remote command is made the same as and no provision is made for sending arbitrary signals to the remote process. The protocol is described in detail in remshd(1M). Any program using must be run as superuser. rcmd_af() function behaves the same as but it can also create an TCP socket. The type of socket to be created is specified through the argument. fails with if the address family is not supported. rresvport() The function creates a socket and binds it to a reserved port. This socket is suitable for use by and several other routines. The caller is expected to set the initial value of to a number between 512 and (The value of is defined in and is 1024.) Typically, the initial value of is set to If the value is outside the valid range, resets it silently to The function uses the inital value of as the first port number that it tries to bind to the created socket. If the operation fails, decrements and attempts to bind the new port number to the socket. The process is repeated until either the operation succeeds, or the port numbers between 512 and are exhausted. If the call succeeds, the socket descriptor is returned to the caller and the port number is returned in the location pointed to by port. If the call fails, -1 is returned to the caller. The socket returned by has the option on. Only the superuser is permitted to bind a privileged address to a socket. Therefore, any program using must be run as superuser. rresvport_af() function behaves the same as but it can also create an TCP socket. The type of socket to be created is specified through the argument. fails with if the address family is not supported. ruserok() The function is used by servers to authenticate clients requesting service with verifies that ruser on rhost is authorized to act as luser on the local host. superuser is an integer flag that should be nonzero if the local user name corresponds to a superuser. If the superuser flag is not set, first checks the file to authenticate the request for service. If this check succeeds, returns 0. If the superuser flag is set, or if there is no file or if the check fails, then checks the file (if there is one) in the local user's home directory. returns 0 if this check succeeds. Otherwise, it returns -1. Typically, the file contains a list of host names, and users' files contain host-name/user-name pairs. A remote user is authenticated by if the remote host name appears in and the remote user name and local user name are the same, or if the remote host name and the remote user name appear together in in the home directory of the local user. For a complete explanation of the syntax understood by see hosts.equiv(4). DIAGNOSTICS
rcmd() Diagnostic Messages generates the following diagnostic messages. gethostbyname was unable to find an entry in the hosts database matching the name of the server (see gethostent(3N) and hosts(4)). Next step: Have the system administrator of your host check whether the remote host's entry is in the database (see hosts(4)). Unable to establish a connection to the reserved port. A message that specifies the reason for the failure is appended to this diagnostic message. Error writing to the socket connection set up for error message transmission. Error executing the system call. Appended to this error is a message specifying the reason for the failure. Socket connection not established on a reserved port or socket address not of the Internet family type. Error in reading information from the standard socket connection. Appended to this error is a message explaining the reason for the error. The remote host did not connect within 30 seconds to the secondary socket set up as an error connection. The program attempted to read from the socket and failed. This means the socket connection with the remote host was lost. message... An error message can be transmitted through the socket connection from the daemon. That message will be sent to While waiting for the secondary socket to be set up, had its primary connection shut down. This may have been caused by an inetd security failure. While trying to set up the secondary socket, had an error condition on its primary connection. While trying to set up its secondary socket, ran out of some resource that caused the accept to be timed out. Next step: Repeat the command. rresvport() Diagnostic Messages generates the following diagnostic messages. These messages can also appear in since calls Error in executing the system call. The error message returned by the system call is appended to the message. All reserved ports in use. If a timeout occurs, check whether the Internet Services are installed and is running. EXAMPLES
To execute the command on remote host using the remote account call as shown below. This program requires superuser privileges and the remote account must be equivalent (see hosts.equiv(4)) to the local account that runs the program. #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <netdb.h> #include <stdio.h> #include <pwd.h> struct passwd *getpwuid(); char *host[] = { "hpxzgy" }; char *cmd = "date"; char *ruser = "chm"; main(argc,argv) int argc; char **argv; { struct servent *sp; struct passwd *pwd; FILE *fp; char ch; int rem; sp = getservbyname("shell","tcp"); pwd = getpwuid(getuid()); rem = rcmd(host, sp->s_port, pwd->pw_name, ruser, cmd, 0); if (rem < 0) exit(1); /* rcmd outputs its own error messages */ fp = fdopen(rem, "r"); while ((ch = getc(fp)) != EOF) putchar(ch); } WARNINGS
There is no way to specify options to the call that makes. Since replaces the pointer to the host name with a pointer to the standard name of the host in a static data area, this value must be copied into the user's data area if it is to be used later. Otherwise, unpredictable results will occur. AUTHOR
was developed by the University of California, Berkeley. SEE ALSO
login(1), rlogin(1), remsh(1), named(1M), remshd(1M), rexecd(1M), gethostent(3N), rexec(3N), hosts.equiv(4), thread_safety(5). rcmd(3N)
All times are GMT -4. The time now is 02:53 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy