LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Find and allow ssh clients (https://www.linuxquestions.org/questions/linux-newbie-8/find-and-allow-ssh-clients-798626/)

thangappan 03-29-2010 06:39 AM

Find and allow ssh clients
 
Is there any way to find out from this machine, this user is logged into my machine using any mechanism or command?

Also I can allow this users can put ssh to my system. Is it possible?

Sayan Acharjee 03-29-2010 06:42 AM

Quote:

Originally Posted by thangappan (Post 3916591)
Is there any way to find out from this machine, this user is logged into my machine using any mechanism or command?

Also I can allow this users can put ssh to my system. Is it possible?

Not sure what are you asking, but you can view the currently logged in users with w or who command.

PMP 03-29-2010 08:44 AM

Quote:

Also I can allow this users can put ssh to my system. Is it possible?
Yes It is possible

thangappan 03-29-2010 10:28 PM

Find and allow the ssh clients
 
I too find out using SSH_CLIENT and SSH_CONNECTIONS environment variable it could be done.

Is there any other way?

alinas 04-02-2010 05:16 PM

I like the following command:
netstat -a | grep ESTABLISHED
It's not for showing users or specifically ssh, but useful for exploring connections...

portamenteff 04-03-2010 02:01 AM

Quote:

Originally Posted by PMP (Post 3916714)
Yes It is possible

It certainly is. If you're running sshd (ssh daemon) anyone with a username and password can login unless you've locked them out. if you are on a router or switch, or hub, you need to port forward port 22 on that device. that is ssh's port usually. goto this address: http://www.whatismyip.com/
and have the user input that address. i'd use
Code:

ssh -l username 76.25.x.x (whatever that address is)
If you're not running sshd type sshd in the terminal. If you don't have it installed, go into your package manager and get it. although every system i've had has shipped with it.


All times are GMT -5. The time now is 03:40 AM.