- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: How to SSH for remote execution
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
12-07-2005 09:40 PM
12-07-2005 09:40 PM
I am designing a script where i need to execute some commands on different server from one server.
Previously i was using "remsh" to accomplis this but now i have to move away from "remsh" and use "ssh" instead.
Please guide me how to do it.
Regards
Santosh Jha
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 10:02 PM
12-07-2005 10:02 PM
SolutionCheck out this link
http://www.employees.org/~satch/ssh/faq/INSTALL.txt
HtH,
Siva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 10:04 PM
12-07-2005 10:04 PM
Re: How to SSH for remote execution
you can use your script as before, only changing the remsh with ssh [correct syntak]. check man ssh for syntak.
Also, you can use use public key authentication using SSH which helps a lot in automation so that password less authentication happends between two machines.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 10:14 PM
12-07-2005 10:14 PM
Re: How to SSH for remote execution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 11:13 PM
12-07-2005 11:13 PM
Re: How to SSH for remote execution
if both the servers are having correct host based authentication keys, then
from server1
ssh -q server2 ll
will work fine :)
br
Thummalu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 11:18 PM
12-07-2005 11:18 PM
Re: How to SSH for remote execution
ssh -l oracle server2 ls
This you have to incorpate in your script on the server1.
If you want to do many operations on remote m/c, then
ssh -l oracle server2 << EOF
ls
pwd
netstat -na
EOF
hth,
Prabu.S
If you want steps for using pasword less authentication, I can also send them
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2005 11:19 PM
12-07-2005 11:19 PM
Re: How to SSH for remote execution
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=851253
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-08-2005 07:05 PM
12-08-2005 07:05 PM
Re: How to SSH for remote execution
1) Generate your identity on unix_box
If you already have created your identity (file /home/your_login/.ssh/id_rsa exists), please skip this step otherwise you will destroy your previous setup.
This setup you will do only once per user and system.
ssh-keygen -t rsa
2) Distribute your identity to other nodes
This setup you have to do for every user and system from which you want to conect for all users and systems you want to connect to :
2.1 Create .ssh directory on targer_node
ssh target_user@target_node [ ! -d /home/your_login/.ssh ] && (mkdir /home/your_login/.ssh;chmod 700 /home/your_login/.ssh)
2.2 Copy your public identity to target
cat /home/your_login/.ssh/id_rsa.pub | ssh target_user@target_node tee -a /home/your_login/.ssh/authorized_keys
3) Simply use ssh and scp or sftp
ssh target_node
ssh your_login@target_node
ssh your_login@target_node command parameter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-09-2005 03:34 AM
12-09-2005 03:34 AM
Re: How to SSH for remote execution
Substitute: /home/your_login
with: ~your_login
~your_login will point to the home-directory of user your_login regardless if it is on /home or elsewhere...
/2r