Sponsored Content
Top Forums Shell Programming and Scripting ksh connection to other servers Post 302491404 by Corona688 on Thursday 27th of January 2011 10:29:00 AM
Old 01-27-2011
Quote:
Originally Posted by LiorAmitai
Hello,

I am looking for a way for a server to launch a connection command to one of the other servers where the connection command has already embedded in it a server name, user name and a password.
Do you mean ssh?

Embedding passwords in shell commands is a bad idea, it's very insecure. For this reason ssh -- and nearly any other login system like su and sudo -- make it extremely difficult to do so. You'd need to install special tools to even make it possible.

Fortunately ssh has a much better, more reliable, and secure way to do noninteractive logins than forcing it to take a noninteractive password: keys. Create your own key and set it up on the remote server with the ssh-copy-id username@host command and you'll be able to login passwordlessly thereafter with ssh username@host. Google "passwordless ssh", the net's littered with hundreds of examples.
This User Gave Thanks to Corona688 For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Testing ssh connection from KSH script

Hi. I have a kornshell script that runs on a daily basis as a cron job. Part of what the script does is copy the folder contents from another server to the current server (server where KSH script is running). I have a scp command, as follows: scp $REMOTE_HOST:$REMOTE_FILE_DIR/* $TMP_DIR ... (8 Replies)
Discussion started by: dmilks
8 Replies

2. Shell Programming and Scripting

ksh to run servers

I want to write a Kshell program which will start the servers(Oracle,DataIntegrator). Can anybody help me with this? I would appreciate your help. Thanks in advance (0 Replies)
Discussion started by: pari111222
0 Replies

3. UNIX for Dummies Questions & Answers

3 servers 1 .ksh script

system = AIX How can I explain this..... Keep in mind I do not want to login to the boxes, persay, and that I am fairly new to scripting and unix. I want to use SSH. I have a script on server1, this is where I want it to run from. I have server2 and server3, where I want the script to... (2 Replies)
Discussion started by: cml2008
2 Replies

4. Shell Programming and Scripting

KSH 88 - Can I find the PID for an IP connection?

Hi, If I use this command netstat | grep "1268" it shows me all IP addresses connected via port 1268, which is half of what I want. I would like to be able to then map these against a PID on the system, and also thereby get the userid. I have done a couple of days google bashing but... (3 Replies)
Discussion started by: gcraill
3 Replies

5. Shell Programming and Scripting

Same KSH behaving differently on diff servers

HI all I have written a ksh to execute PL/sql procedure and generate the log file. The script is working fine to the extent of calling the taking input, executing PL/SQL procedure. On one server the log file is getting generated properly. i,e it shows the DBMS output . The log file size was... (9 Replies)
Discussion started by: ramakrishnakini
9 Replies

6. Solaris

secure connection between two servers ?

hello all, i have a question if i have two servers each one run an application i want to make a tunnel channel between the two servers the two application each one has a specific port . for example server A has port 2001 and server B has port 2002 server A talk to server A using any... (1 Reply)
Discussion started by: maxim42
1 Replies

7. UNIX for Dummies Questions & Answers

For SFTP connection - How to give password in UNIX Script (ksh)

Hi, I am not able to give the password in Unix script for SFTP connection. When I am trying to manully SFTP command for accessing the server , it asking for pwd and I could provide the pwd but I am not getting how to provide the pwd inside the Unix script. sftp -v user@xyz.com. ... (4 Replies)
Discussion started by: Vineeta Nigam
4 Replies

8. UNIX for Dummies Questions & Answers

ksh to check second time difference between two servers

I am currently setting up a public key authentication between servers. The goal is to get the date via `ssh hostname date` on all the 4 remote servers , put the value in a text file on the central server and compare the date (specifically seconds) for each server date output to check if time is... (7 Replies)
Discussion started by: depam
7 Replies

9. UNIX for Dummies Questions & Answers

Ftps connection by ksh script

Hi, I'm trying to access to FTP SERVER over SSL with this script unix : (credentials are correct) #!/usr/bin/ksh USER="test" PASSWORD="pwdtest" IP="**.***.*.***" ftp -s $IP 990 << EOF >>log_ftp user $USER $PASSWORD bin passive EOF but seems that credentials are not passed... (2 Replies)
Discussion started by: nash83
2 Replies

10. Red Hat

Different connection status between 2 servers

Hello All, Actually, We have a problem in our server (RHEL 7.1), 1st server is used for payment apps like switch card payment (passthru only), and 2nd server is used for Database transaction. When high transaction there is different connection between Apps Server and DB server, Apps Server... (0 Replies)
Discussion started by: I Made Dwi
0 Replies
NWUSERLIST(1)							    nwuserlist							     NWUSERLIST(1)

NAME
nwuserlist - List Users logged in at a NetWare server SYNOPSIS
nwuserlist [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] [ -a ] [ -q ] [ -f [ -d ] [ -D ] [ -t ]] DESCRIPTION
nwuserlist lists the users logged in at a NetWare server, together with their connection number and their login time. nwuserlist looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more informa- tion. Please note that the access permissions of $HOME/.nwclient MUST be 600 for security reasons. OPTIONS
-h -h is used to print out a short help text. -S server server is the name of the server you want to use. -U user user is the user name to use for login. -P password password is the password to use for login. If neither -n nor -P are given, and the user has no open connection to the server, nwuserlist prompts for a password. -n -n should be given if no password is required for the login. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. -a With option -a the IPX address of the station the user is logged in from is printed as well. -q With option -q object ID is printed in addition to user name. -f List also files opened by each connection. -d List detailed informations about each file. -D List DOS filename instead of filename which was used for opening. -t Show raw hexadecimal values in addition to human readable conversions. AUTHORS
nwuserlist was written by Volker Lendecke. See the Changes file of ncpfs for other contributors. nwuserlist 7/22/1996 NWUSERLIST(1)
All times are GMT -4. The time now is 06:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy