Solved

ssh remote command

Posted on 2006-07-01
6
608 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
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
awk file 6 97
What is linux 4.8.22? Is it the same as ubuntu 16.10 ?? 2 70
RHEL 6.7 Gnome Desktop on VMware 6 VM 9 108
NTPD Client Port Usage 12 62
This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
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.

740 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