[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ssh remote command

Posted on 2006-07-01
6
Medium Priority
?
617 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
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure 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…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses
Course of the Month18 days, 16 hours left to enroll

834 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