Solved

ssh remote command

Posted on 2006-07-01
6
611 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
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 
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 250 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

705 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