Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How to get the remote hostname

Posted on 2006-10-21
2
Medium Priority
?
212 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 58

Accepted Solution

by:
amit_g earned 300 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Hi friends,  in this video  I'll show you how new windows 10 user can learn the using of windows 10. Thank you.

618 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