- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Redirect STDIN
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
Forums
Discussions
Discussions
Discussions
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
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
06-13-2003 01:16 AM
06-13-2003 01:16 AM
Redirect STDIN
Using OpenSSH, I connect from one system, called BASTION, to another system, called TARGET.
I wish to record the commands entered at the keyboard while connected to TARGET into a file on BASTION. That is, I wish to record STDIN only, without STDOUT.
Does anyone know how I can achieve this?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 01:29 AM
06-13-2003 01:29 AM
Re: Redirect STDIN
ssh TARGET | tee target.out
Regards,
Karthik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 01:30 AM
06-13-2003 01:30 AM
Re: Redirect STDIN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 01:33 AM
06-13-2003 01:33 AM
Re: Redirect STDIN
and if you enable history on the TARGET you should get what you want.
For example, putting HISTFILE and EDITOR variables in .profile.
If you wish to keep track of command, you can also personalize the name of the history file for each connection,
export HISTFILE=$HOME/.sh_history`tty|tr / _`
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 01:39 AM
06-13-2003 01:39 AM
Re: Redirect STDIN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 02:55 AM
06-13-2003 02:55 AM
Re: Redirect STDIN
Did you try 'tee file | command' (ie tee /tmp/a | remsh hostname). It works, but I can't avoid echoing of all commands ...
Regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 03:05 AM
06-13-2003 03:05 AM
Re: Redirect STDIN
script
This will record everything done - input and output.
you could then ftp it to bastion if you wanted to
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 06:29 AM
06-13-2003 06:29 AM
Re: Redirect STDIN
The best for your problem is to use
the "script" command so you will see the
whole input in the file!
You can also use the command | tee logfile
But script better.
Caesar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2003 06:39 AM
06-13-2003 06:39 AM
Re: Redirect STDIN
You can also use tee -a filename to
take the stdin
Caesar