Re: [Hampshire] irritating ssh behaviour

Top Page

Reply to this message
Author: Simon Reap
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] irritating ssh behaviour
Victor Churchill wrote:
> The ssh man page sayeth:
> SYNOPSIS
>      ssh <lots of options> [user@]hostname [command]
> ...
>      If command is specified, it is executed on the remote host
> instead of a login shell.

>
> Something's not right..

I htink it is the 2instead of a login shell" that is causing the problem
- it isn't going through your normal login process, reading profiles and
so on.

How about something like:

    ssh qq3 '. .bash_profile ; oerr ORA 12152'


(you may also need to source /etc/profile, or whichever other startup
scripts do something useful).

You could just try adding the full path to the command (ssh qq3
'/opt/oracle/bin/oerr ORA 12152'), but that wouldn't do things like set
environment variables which Oracle may require.

Simon