Sponsored Content
Top Forums UNIX for Dummies Questions & Answers a problem with write a script in Linux version 2.4.27-ubnt0 Post 302471647 by DGPickett on Sunday 14th of November 2010 12:46:20 PM
Old 11-14-2010
I suspect you did not show us all the files, but it sound like you forgot that in the form
Code:
ssh user@host cmd

the command runs with a default shell and $PATH. Do an
Code:
ssh user@host 'ps -fp $$ ; echo $PATH'

to see what shell is active, and if you need to provide more path for cmd.

Else, do something to set environment like
Code:
ssh user@host '. ./.profile ; cmd'

BTW, to improve speed when doing more than one thing remotely, something like this works well, and you can preview your generated script locally with ease and accuracy:
Code:
(
  scripting-to-generate-all-setup-and commands
 ) | ssh user@host ksh

This User Gave Thanks to DGPickett For This Post:
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Need to write a home-grown backup script for Linux

I am researching ways in which to backup files or whole file systems for backup to another system. We are using Suse Linux 7.0 with no tape backup devices or secondary disks. What utilities would be the best to use for a simple yet flexible script for backup purposes? tar, cpio, compress. (3 Replies)
Discussion started by: darthur
3 Replies

2. UNIX for Dummies Questions & Answers

How to write my own version of pthread_join()

I would like to write my own version of pthread_join and some of the other pthread function. Does some know any pages that have som examples of doing this?? (1 Reply)
Discussion started by: bigblop
1 Replies

3. UNIX for Dummies Questions & Answers

How do I see which version of Linux I am using ?

I want to know the distribution and version of linux that I am running: uname -r gives me: 2.4.20-8bldsmp uname -v gives me: #1 SMP Wed Sep 20 19:32:24 PDT 2006 Whats the distribution ? and whats the version ? thanks !!! (1 Reply)
Discussion started by: the_learner
1 Replies

4. Linux

Why is there so many linux version?

Hi, Why is there many different Linux names and SO instead to be only one? What are the differences? Paul Weinstock (3 Replies)
Discussion started by: Paul Weinstock
3 Replies

5. Linux

How to know the Linux version?

Hi, How to know the Linux version in the box in which linux is installed ? Cheers K Md Shakeel (3 Replies)
Discussion started by: krackjack
3 Replies

6. Shell Programming and Scripting

Write a shell script security policy settings for linux

The pro help! Write a shell script setup for linux security policies include: 1. login (username and password login). 2. add, delete your username and password. 3. firewall. Note: Write a shell script file as follows: If login successful then Step 2. If step 2 succeeds (ie add,... (1 Reply)
Discussion started by: ngovuongbinhtay
1 Replies

7. Linux

Linux Version of IE?

Is there a linux version of IE? (5 Replies)
Discussion started by: billcrosby
5 Replies

8. Shell Programming and Scripting

How to write bash script for creating user on multiple Linux hosts?

I wonder whether someone can help me with what I'm trying to achieve Basically, the objective is one script to create new user on more than 70 linux hosts if required. Everything works apart from the highlighted part. It gave me an output passwd: Unknown user name ''. when try to set... (35 Replies)
Discussion started by: fugeulu
35 Replies

9. Shell Programming and Scripting

Setuid not working in Linux as script fails to write to file.

Hi, I have the following 3 test files to test setuid bit which if it works I would like to implement in our application. However setuid doesnot seem to be having any impact on my test below.Following are the 3 files of interest in /tmp/ folder. $ ls -ltr *env* -rw------- 1 g332008 users 6... (23 Replies)
Discussion started by: waavman
23 Replies

10. Shell Programming and Scripting

Write Linux script to convert timestamps older than 1.1.1970 to 1.1.1980

I am having problems because some of my files have timestamps that are earlier that 1.1.1970, the Unix start of time convention. So I would like to write a script that finds all files in home folder and subfolders with timestamps earlier than 1.1.1970 and converts them to 1.1.1980. I... (3 Replies)
Discussion started by: francus
3 Replies
ssh-keysign(1M) 														   ssh-keysign(1M)

NAME
ssh-keysign - ssh helper program for host-based authentication SYNOPSIS
ssh-keysign ssh-keysign is used by ssh(1) to access the local host keys and generate the digital signature required during host-based authentication with SSH protocol version 2. This signature is of data that includes, among other items, the name of the client host and the name of the client user. ssh-keysign is disabled by default and can be enabled only in the global client configuration file /etc/ssh/ssh_config by setting Host- basedAuthentication to yes. ssh-keysign is not intended to be invoked by the user, but from ssh. See ssh(1) and sshd(1M) for more information about host-based authen- tication. /etc/ssh/ssh_config Controls whether ssh-keysign is enabled. /etc/ssh/ssh_host_dsa_key /etc/ssh/ssh_host_rsa_key These files contain the private parts of the host keys used to generate the digital signature. They should be owned by root, readable only by root, and not accessible to others. Because they are readable only by root, ssh-keysign must be set-uid root if host-based authentication is used. ssh-keysign will not sign host-based authentication data under the following conditions: o If the HostbasedAuthentication client configuration parameter is not set to yes in /etc/ssh/ssh_config. This setting cannot be overri- den in users' ~/.ssh/ssh_config files. o If the client hostname and username in /etc/ssh/ssh_config do not match the canonical hostname of the client where ssh-keysign is invoked and the name of the user invoking ssh-keysign. In spite of ssh-keysign's restrictions on the contents of the host-based authentication data, there remains the ability of users to use it as an avenue for obtaining the client's private host keys. For this reason host-based authentication is turned off by default. See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWsshu | +-----------------------------+-----------------------------+ |Interface Stability |Evolving | +-----------------------------+-----------------------------+ ssh(1), sshd(1M), ssh_config(4), attributes(5) AUTHORS
Markus Friedl, markus@openbsd.org HISTORY
ssh-keysign first appeared in Ox 3.2. 9 Jun 2004 ssh-keysign(1M)
All times are GMT -4. The time now is 08:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy