Sponsored Content
Operating Systems Linux Ubuntu Run a script at remote server without ssh password Post 302958870 by rbatte1 on Tuesday 27th of October 2015 04:40:03 AM
Old 10-27-2015
If you are connecting as root to the remote server and the setting is PermitRootLogin=no then you will be unable to do this. If you are connecting as another user (non-zero uid) then this flag will have no effect, however you have to consider what happens with the standard profiles for that account logging in, e.g. does it assume a terminal, lock you into an application etc.


Robin
This User Gave Thanks to rbatte1 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Issues using ssh from crontab to run remote script from

I have a solaris9 x86 server using ssh as follows: SSH Version Sun_SSH_1.0, protocol versions 1.5/2.0. The remote server solaris9 sparc has exactly the same version ssh installed. I am running a script on my server which includes the following command to run a script on the remote server:... (4 Replies)
Discussion started by: frustrated1
4 Replies

2. Shell Programming and Scripting

run a application from a remote server via script?

I have a ksh script that does a bunch of things, then runs telnet server_b I then manually login, manually run one command (which launches an application with display back to my workstation), then logout at which point the main script takes back over, runs something else, then ends. Is... (4 Replies)
Discussion started by: yankee428
4 Replies

3. Shell Programming and Scripting

Ability to run sas prog on remote server using SSH

Hi, I am trying to run a sas prog on a remote server using ssh. I have got the command that I am using in the below paragraph. With it, I was able to run shell scripts but when I tried 'sas' it errored out. I have got my keys exchanged so when I say ssh serverA I automatically connect to my... (4 Replies)
Discussion started by: coolavi
4 Replies

4. Shell Programming and Scripting

[SSH] Need to connect to remote server as different user and without password

I have a task requiring that USER_A run a script, which connects to HOST_B as USER_B and does not ask for a password. If I am logged in on HOST_A as USER_B, I can connect to HOST_B without a password, no problem. However, if I try running ssh with the command line "ssh USER_B@HOST_B" while... (3 Replies)
Discussion started by: Totengraber
3 Replies

5. Shell Programming and Scripting

Need help on how to exit a script run on a server from a remote server

hi, I am using the below line to run a script from remote server(say server A) to another server(say server B). ssh username@servername ksh script name. The issue is the script logs into server B, executes the script on server B, transfers the file to server A but does not exit from... (4 Replies)
Discussion started by: yohasini
4 Replies

6. UNIX for Dummies Questions & Answers

how to use ssh to run shell script on a remote machine?

how to use ssh to run shell script on a remote machine? ssh user@remote sh ./script.unx i ran the above command ./script.unx HAS NOHUP COMMAND IN ITS BODY, I AM GETTING ERROR AS NOHUP NOT FOUND... i tried to run that script from remote server, its working fine do ineed to set... (6 Replies)
Discussion started by: only4satish
6 Replies

7. Shell Programming and Scripting

Copy and run that script in Remote server

Hi All, I need script to perform below task. 1. I have a script in one server and need to copy this script to remote server 2. login in to remote server 3. run the script which i copied to this server. #!/bin/bash read a scp /tmp/script.sh user@hostname:/tmp ssh user@$a ./scirpt.sh ... (2 Replies)
Discussion started by: bapu1981
2 Replies

8. Shell Programming and Scripting

Script to ssh to remote server

Hi All, I need to prepare a script. Description: Currently i am in server "x(ubuntu os)", here i need to develop a script to ssh to another server "y(ubuntu os)", i have password less authentication to "y". i have done the below #!/bin/bash #ssh to the server "y" and confirming i am... (2 Replies)
Discussion started by: kumar85shiv
2 Replies

9. Solaris

Script to get files from remote server to local server through sftp without prompting for password

Hi, I am trying to automate the process of fetching files from remote server to local server through sftp. I have the username and password for the remote solaris server. But I need to give password manually everytime i run the script. Can anyone help me in automating the script such that it... (3 Replies)
Discussion started by: ssk250
3 Replies

10. Shell Programming and Scripting

How to run commands on remote server using ssh password less authentication?

Hi, I need to run a script located in a directory on remote server by using ssh authentication from my local unix server. Can anyone help me in this. I have tried the below command. It worked for echo command but when i tried to open a file using cat command it is showing "cat: cannot open... (6 Replies)
Discussion started by: ssk250
6 Replies
RSHD(8) 						    BSD System Manager's Manual 						   RSHD(8)

NAME
rshd -- remote shell server SYNOPSIS
rshd [-aiklnvxPL] [-p port] DESCRIPTION
rshd is the server for the rsh(1) program. It provides an authenticated remote command execution service. Supported options are: -n, --no-keepalive Disables keep-alive messages. Keep-alives are packets sent at certain intervals to make sure that the client is still there, even when it doesn't send any data. -k, --kerberos Assume that clients connecting to this server will use some form of Kerberos authentication. See the EXAMPLES section for a sample inetd.conf(5) configuration. -x, --encrypt For Kerberos 4 this means that the connections are encrypted. Kerberos 5 can negotiate encryption even without this option, but if it's present rshd will deny unencrypted connections. This option implies -k. -v, --vacuous If the connecting client does not use any Kerberised authentication, print a message that complains about this fact, and exit. This is helpful if you want to move away from old port-based authentication. -P When using the AFS filesystem, users' authentication tokens are put in something called a PAG (Process Authentication Group). Multi- ple processes can share a PAG, but normally each login session has its own PAG. This option disables the setpag() call, so all tokens will be put in the default (uid-based) PAG, making it possible to share tokens between sessions. This is only useful in peculiar environments, such as some batch systems. -i, --no-inetd The -i option will cause rshd to create a socket, instead of assuming that its stdin came from inetd(8). This is mostly useful for debugging. -p port, --port=port Port to use with -i. -a This flag is for backwards compatibility only. -L This flag enables logging of connections to syslogd(8). This option is always on in this implementation. FILES
/etc/hosts.equiv ~/.rhosts EXAMPLES
The following can be used to enable Kerberised rsh in inetd.cond(5), while disabling non-Kerberised connections: shell stream tcp nowait root /usr/libexec/rshd rshd -v kshell stream tcp nowait root /usr/libexec/rshd rshd -k ekshell stream tcp nowait root /usr/libexec/rshd rshd -kx SEE ALSO
rsh(1), iruserok(3) HISTORY
The rshd command appeared in 4.2BSD. AUTHORS
This implementation of rshd was written as part of the Heimdal Kerberos 5 implementation. HEIMDAL
November 22, 2002 HEIMDAL
All times are GMT -4. The time now is 05:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy