LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-29-2015, 10:28 AM   #1
falcon24
LQ Newbie
 
Registered: Jun 2015
Distribution: fedora_20
Posts: 6

Rep: Reputation: Disabled
Question good


hi there,
i currently use Fedora
my question is that
when i connect another Fed using ssh it shows connected
but when i execute any command like:
ssh user@ip_addr ls
it shows ls of my own pc
plz show me a way to execute commands on remote pc via ssh
or any other possible way /without installing packages/
 
Old 06-29-2015, 10:49 AM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,522

Rep: Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106
Are you sure? Because it should not be working like that. Can you show us an example?
 
Old 06-29-2015, 10:53 AM   #3
netnix99
Member
 
Registered: Jun 2011
Distribution: redhat, CentOS, OpenBSD
Posts: 298

Rep: Reputation: 98
falcon24,

I have to admit that I am not using Fedora, but I am using Red Hat Enterprise Linux. Your command
Code:
ssh user@ip_addr ls
is right on the money. I ran several tests, just to make sure, and the results are:

ssh user@ip_addr ls: works just like it is expected too.

ssh user@ip_addr command_requiring_root_privilege: after successful login, I receive "PERMISSION DENIED"

ssh user@bad_ip_addr ls: ssh: connect to host x.x.x.x port 22: No route to host

After trying multiple different commands, I was never able to get the command to fail and give me a ls of the local machine. Is it possible that the directory of the user that you are remoting in as has the same content as you do on the local machine?

Example: Your home directory is on an NFS filesystem on both machines (/nfs_dir/user). if you were in your home directory, and used the command given above (ssh user@ip_addr ls), the "ls" on the remote system would be of the same directory you are in (/nfs_dir/user)

You might try
Code:
ssh -vvv user@ip_addr ls
and post the output if you are still having issues. When you do this, also upload
Code:
 pwd; ls
from your local machine.
 
Old 06-29-2015, 12:21 PM   #4
falcon24
LQ Newbie
 
Registered: Jun 2015
Distribution: fedora_20
Posts: 6

Original Poster
Rep: Reputation: Disabled
Actually
the PC's arent connected
the only thing is that they have same internet connection
i m sure commands are executing on my own pc
and commands such as shutdown reboot dont work via ssh
my doubt is
even after ssh shows connected why it does not execute commands on remote machine
do i need to start any spefic service (apart from sshd) on remote

PSlz post if you know to exec commands on remote pc via ftp
and also few ftp sites which i can use to test ftp commands


#Linuxrocx
 
Old 06-29-2015, 01:03 PM   #5
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,522

Rep: Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106Reputation: 2106
Quote:
Originally Posted by falcon24
even after ssh shows connected why it does not execute commands on remote machine
it does

You're either doing it wrong or you don't understand what you're seeing. To resolve EITHER of these issues you NEED to provide details and examples like you've been requested to do twice already.

FTP stands for "file transfer protocol". It's for transferring files, you can't run commands on the remote machine.

Last edited by suicidaleggroll; 06-29-2015 at 01:06 PM.
 
Old 06-29-2015, 08:17 PM   #6
berndbausch
Senior Member
 
Registered: Nov 2013
Location: Tokyo
Distribution: Redhat/Centos, Ubuntu, Raspbian, Fedora
Posts: 1,691

Rep: Reputation: 353Reputation: 353Reputation: 353Reputation: 353
Quote:
Originally Posted by falcon24 View Post
Actually
the PC's arent connected
the only thing is that they have same internet connection
i m sure commands are executing on my own pc
and commands such as shutdown reboot dont work via ssh
my doubt is
even after ssh shows connected why it does not execute commands on remote machine
do i need to start any spefic service (apart from sshd) on remote
You don't need any additional services. sshd starts whatever program you tell it to, and if you don't specify the program, it will start the shell.

Perhaps both PCs have the same IP address?
Or: When you run ssh user@ipaddr (without a command), are you sure you are connected to the remote system, and not the local system?

If this doesn't help, you can also raise the level of verbosity on the client, with -v, -vv and so on. There are also verbosity options for the server, sshd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Good morning, god day, good afternoon, good night! wumpel LinuxQuestions.org Member Intro 3 10-07-2010 04:57 AM
LXer: IBM Sun acquisition : Good for Unix. Good for Linux. Bad for HP LXer Syndicated Linux News 0 03-18-2009 11:00 AM
A good semi-manual distro... any comments? One good for running InkScape? rylan76 Linux - General 5 12-11-2008 07:46 AM
A good live distro with a good hardware diagnostic & profiling program? studpenguin General 2 11-25-2008 03:37 AM
Good morning, Good evening, Good night. Cheeseboy LinuxQuestions.org Member Intro 2 11-04-2004 09:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:43 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration