- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need help with SSH/Job Control
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2005 09:40 AM
тАО08-25-2005 09:40 AM
Re: Need help with SSH/Job Control
All maybe/is well what you are saying in your answer about the non-interactive logins, but I have or had the same problem with my interactive ssh sessions. And for what I know, I need to give input to those screens and need to see something on the stdout, which was tty..
Do you have any idea why those sessions were hung and how to circumvent it ?
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-25-2005 11:14 PM
тАО08-25-2005 11:14 PM
Re: Need help with SSH/Job Control
do you use X11 forwarding or other TCP connection forwarding with your sessions? If there is a forwarded connection still active when you log out of the shell connection, the ssh will "hang" until the forwarded connection gets closed. To confirm this, enter "~#" to a "hung" SSH session. It should list the active connections. Entering "~." would force the session to disconnect.
It seems there has also been a bug in the OpenSSH code which might be related to your problem. Version 3.71 (and maybe before) had the problem, 3.81 had a tentative solution, and 3.9+ should have a final solution for this bug.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-26-2005 02:30 AM
тАО08-26-2005 02:30 AM
Re: Need help with SSH/Job Control
It took 1 day for me to figure that out.
This is valid only for some commands/processes ( for me was java binary .. ) and you cannot hide those commands by using wrapper scripts.
Using explicit exit commands doesn't solve the problem either.
Instead redirect stdout and stderr to normal files or to /dev/null ( if you don't need the output ) :
$ ssh remhost "cmd 1>/tmp/cmd.out 2>/tmp/cmd.err"
It isn't an elegant solution but it works
andrei
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-26-2005 05:49 AM
тАО08-26-2005 05:49 AM
Re: Need help with SSH/Job Control
The use of the tilde should be perfectly fine!
There is a misconception about the ~ -- it does *not* a generate relative pathname!
The shell will convert it to an absolute name prior to being passed to the program.
From 'man sh-posix' :
After alias substitution is performed, each word is checked to see if
it begins with an unquoted tilde (~). If it does, the word up to a /
is checked to see if it matches a user name in the /etc/passwd file.
If a match is found, the ~ and the matched login name are replaced by
the login directory of the matched user.
Also, using an arg dump program:
Pine3 ## args ~bobv |head
These are the execution-time arguments:
args
/home/.bobvance
hth
bv
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2005 04:18 AM
тАО08-27-2005 04:18 AM
Re: Need help with SSH/Job Control
Matti Kurkela and Andrei Lica, redirecting the output and input to /dev/null did indeed solve my problem; mostly anyways. I used Matti's example, and it worked great. Only it would be nice to capture the output still, so if someone has a convenient way to do this, and include it in the e-mailed job that would be great.
Also, I tried the -n option to ssh, and that did not help for me.
I also upgraded to the most recent version of ssh (4.0.something) and that did not seem to make a difference.
And lastly, the explicit exit commands also did not help in this case.
Thanks again all.
Jason
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-27-2005 04:20 AM
тАО08-27-2005 04:20 AM
Re: Need help with SSH/Job Control
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2005 05:34 PM
тАО08-28-2005 05:34 PM
Re: Need help with SSH/Job Control
1. Redirect stdout/err to files then scp the files to local files, process the files.
2. Try to use perl ssh module[s] : http://search.cpan.org/~dbrobins/Net-SSH-Perl-1.28/lib/Net/SSH/Perl.pm
- « Previous
-
- 1
- 2
- Next »