Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Is there a way to list the processes (i.e. "ps" or "top") on a remote computer without using ssh? If ssh is the only way, then I need to figure out why my remote computer isn't allowing any ssh commands, which is a different issue/posting.
Ideally, I could type "ps 192.168.x.x" and it just works, but I'm not seeing any such syntax when I search.
SSH isn't working for you, because you're not using SSH. If you want to use SSH to run a command on a remote server, you have to issue the command WITH SSH:
Code:
ssh <user>@<server> <command>
Read the man page on SSH. Something like "ssh <user>@<server> "ps 192.168.x.x"" will work.
SSH isn't working for you, because you're not using SSH. If you want to use SSH to run a command on a remote server, you have to issue the command WITH SSH:
Code:
ssh <user>@<server> <command>
Read the man page on SSH. Something like "ssh <user>@<server> "ps 192.168.x.x"" will work.
Semantics aside, the only way to view a list of remote processes in Linux is to begin a command-line with "ssh..."? I'm a Windows user and can do what I'm asking very easily. Yet, I'm trying to learn Linux and am quite surprised by the lack of commands to do the same thing.
I'm almost certain it can be done in Linux WITHOUT ssh. I'm just not seeing any clear answers.
there's 101 ways to skin this cat. the most strait-forward way is to just login remotely using /ssh/. else you can create a few scripts and turn on a few services to pipe the output of the command to a file and serve it thru http, ftp, nfs, samba, netcat, email, telnet, vnc, rsh, rdp, sneakernet, ...
this is basically a question like 'what's the best way to drive to work'.
how does one get the list of running processes from a remote windows machine ?
Thanks, schneidz. To refine your drive analogy, I'm trying to find a way to drive to work, by avoiding a particular highway. In my case, "Highway ssh".
So far no one has been able to provide clear directions on how to do that in Linux. Sorry, but "you can create a few scripts and turn on a few services to pipe the output of the command to a file and serve it thru http, ftp, nfs, samba, netcat, email" doesn't help someone who's new to Linux. Try asking your neighbor to do that.
There's no Linux utility or command to view running processes on a remote box, without going through ssh?
You have to have some way of sending a command to the remote system. Your local ssh client does that. There has to be something on the remote system that is listening for incoming connections. Your remote ssh server does that. Or you could use rsh (remote shell), but it isn't encrypted and secure like ssh, so ssh is the preferred method.
ssh [USER-NAME]@[REMOTE-HOST] [command or script]
Here's an example that logs in to a remote system, executes the free command to display memory information on the remote system, pipes the output to grep to look for the line with the numeric values, then pipes it to awk to reformat it. That's maybe not all that useful, but it demonstrates the concept.
Thanks, schneidz. To refine your drive analogy, I'm trying to find a way to drive to work, by avoiding a particular highway. In my case, "Highway ssh".
So far no one has been able to provide clear directions on how to do that in Linux. Sorry, but "you can create a few scripts and turn on a few services to pipe the output of the command to a file and serve it thru http, ftp, nfs, samba, netcat, email" doesn't help someone who's new to Linux. Try asking your neighbor to do that.
There's no Linux utility or command to view running processes on a remote box, without going through ssh?
yes, but there's a difference tween 'how to drive to work' and 'how to drive a car'. I would expect a cab driver to know how to operate a car.
Code:
telnet hostname
ps auxw
exit
replace hostname with the host name or ip- address of the machine you are trying to connect to.
I would suggest your ssh woes mite be due to you not punching the required hole in your router ?
There's no Linux utility or command to view running processes on a remote box, without going through ssh?
Then the remote computer must have another service besides ssh that would entertain commands to list processes on it I guess as you can't do that in ssh unless you make another remote command do that there. Ssh does not work like the vulnerable rpc in windows sorry. And I'm not sure if there's a service like that which you could "set-up" on your remote computer for that.
You could create a quick service like a looping script with netcat that would accept input and output redirected from remote connection and recognize commands that would make it execute yet-another-process to list the processes. The connection could then be tunneled securely with stunnel.
Or perhaps you could find some services around the net that would provide such functionality.
Or perhaps you were wanting to have a command that would wrap-up the tasks of logging in and execute the ps or top command on the remote machine, and list them with a more presented output? But doesn't that execute commands remotely as well?
A shell script might be what you also needed.
Last edited by konsolebox; 04-14-2013 at 01:12 AM.
Semantics aside, the only way to view a list of remote processes in Linux is to begin a command-line with "ssh..."? I'm a Windows user and can do what I'm asking very easily. Yet, I'm trying to learn Linux and am quite surprised by the lack of commands to do the same thing.
I'm almost certain it can be done in Linux WITHOUT ssh. I'm just not seeing any clear answers.
The only way to do something on a remote system is to have something that can be connected to from your local system...
For general purpose operations, that "something" is ssh. If you wanted to retrieve a web page from a remote system, the remote system must be running a web server...
ssh is a general service that authenticates remote connections. Are there equivalences? yes - web server, running a telnet service (or a secure one), running an insecure service such as netcat...
Lots - but in all cases, something must be running on the remote system to respond.
Since most linux distributions are designed to be secure, a generic service must be available, and secured - and ssh provides that service.
Semantics aside, the only way to view a list of remote processes in Linux is to begin a command-line with "ssh..."? I'm a Windows user and can do what I'm asking very easily. Yet, I'm trying to learn Linux and am quite surprised by the lack of commands to do the same thing.
I'm almost certain it can be done in Linux WITHOUT ssh. I'm just not seeing any clear answers.
As others have pointed out, you CAN do it without SSH, but I'm not sure why you're hesitant to use it. It's pretty much a 'standard', is simple to use (and to script for), has great support amongst ALL variants of unix/linux, and can also support file transfer. All that one one port, and it's encrypted. If all you want to do is check basic system info, you might want to look at SNMP, and see if what you're wanting is already reported by the SNMP daemon, but even at that, you're still querying a remote service to return information, just like you would with SSH, web, or any other Windows service.
Yes, you can do it in Windows...sort of. You are STILL connecting to a service of SOME type on the other end; and I'll sidestep the whole security issue that Windows suffers from as a result of those methods.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.