Solved

ssh remote command

Posted on 2006-07-01
6
603 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
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
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

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

Currently, there is not an RPM package available under the RHEL/Fedora/CentOS distributions that gives you a quick and easy way to allow PHP to interface with Oracle. As a result, I have included a set of instructions on how to do this with minimal …
In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 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

13 Experts available now in Live!

Get 1:1 Help Now