Solved

How to get the remote hostname

Posted on 2006-10-21
2
201 Views
Last Modified: 2007-12-19

Hi group,

machine A has a connection to macine B.

It is possible to run some command on machine B as you are on machine A such as:

# ssh  10.0.27.254  ls
# ssh  10.0.27.254  mkdir aDir

but when I do

# ssh 10.0.27.254  echo $HOSTNAME  it doesn't print the name of the remote machine (B)

How can I get that information?

Thanks,
0
Comment
Question by:akohan
  • 2
2 Comments
 
LVL 58

Accepted Solution

by:
amit_g earned 100 total points
ID: 17779279
Use command hostname ...

ssh 10.0.27.254  hostname
0
 
LVL 58

Expert Comment

by:amit_g
ID: 17779468
Why B?
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In a recent article here at Experts Exchange (http://www.experts-exchange.com/articles/18880/PaperPort-14-in-Windows-10-A-First-Look.html), I discussed my nine-month sandbox testing of the Windows 10 Technical Preview, specifically with respect to r…
Windows 10 is here and for most admins this means frustration and challenges getting that first working Windows 10 image. As in my previous sysprep articles, I've put together a simple help guide to get you through this process. The aim is to achiev…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now