?
Solved

ssh remote command

Posted on 2006-07-01
6
Medium Priority
?
613 Views
Last Modified: 2010-04-20
Hi,

When I use this I can run a command on a remote system at work.  For example this command will show me the listing as if I had done "ls" on the remote.

ssh bryan@remotesystem ls
loadlin16c.txt
loadlin16c.zip

However, when I run it this way it gives an error.

ssh -A bryan@remotesystem ls
ssh: remotesystem ls: Name or service not known

I'm just wondering if anyone knows the reason it doesn't work.  Any help is greatly apprecited.  Thanks in advance.
0
Comment
Question by:bryanlloydharris
[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
  • 3
  • 2
6 Comments
 
LVL 22

Expert Comment

by:pjedmond
ID: 17026138
The -A option means that you are using an authentication agent. From the error you've got, your authentication agent has no knowledge of remotesystem.

See:

http://www.cvrti.utah.edu/~dustman/no-more-pw-ssh/

for more information on agents and how to use them to avoid the need for passwords.

(   (()
(`-' _\
 ''  ''
0
 
LVL 24

Expert Comment

by:slyong
ID: 17027727
Hi Brain,

have a look at http://unixwiz.net/techtips/ssh-agent-forwarding.html#fwd, which illustrates agent forwarding (ssh -A) concept.  If you are not using agent forwarding, you don't need to use -A.
0
 
LVL 3

Author Comment

by:bryanlloydharris
ID: 17028317
Yes I'm aware of the meaning of -A.  I was just curious why the ls works when there is no -A, but it doesn't work when there exists a -A.
0
CHALLENGE LAB: Troubleshooting Connectivity Issues

Goal: Fix the connectivity issue in the lab's AWS environment so that you can SSH into the provided EC2 instance.  

 
LVL 3

Author Comment

by:bryanlloydharris
ID: 17028321
Those are very good sites though.  Thanks for them.
0
 
LVL 24

Accepted Solution

by:
slyong earned 1000 total points
ID: 17028362
When you don't use -A, you are issuing the command (ls) on the machine that you are connected to (Server 1 from the URL that I have given you).  When you are using -A, you are issuing the command (ls) on the machine that are forwarded to (Server 2).  If you have not setup the forwarding on Server 1, ssh -A will not work.
0
 
LVL 3

Author Comment

by:bryanlloydharris
ID: 17032602
Thanks slyong, I will read that link.  I have skimmed it and it seems very good.
0

Featured Post

WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.

Question has a verified solution.

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

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month13 days, 17 hours left to enroll

800 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