(ASK) Question about linux network...


 
Thread Tools Search this Thread
Operating Systems Linux (ASK) Question about linux network...
# 1  
Old 10-04-2011
(ASK) Question about linux network...

hi all, im linux nubie n want to ask,

1. how to access the windows pc?
if from windows to windows, we can use :

start-run-\\192.168.1.1\e$

now, how about from linux (fedora) n want to access to windows drive?

if I use ssh from linux to windows,

ssh 192.168.6.171
ssh: connect to host 192.168.6.171 port 22: Connection refused

why?

2. if you want to find a program that already installed it using:
rpm-qa | grep sql (example SQL)

what abaout if i want to find a file?
notepad1.txt (example)

3. if i want to see anybody who connects or anyone did in 192.168.1.1, can i use "mtr"?
example:

mtr 192.168.1.1

4. can we know another IP in my LAN from terminal?

thanks in advance...
# 2  
Old 10-04-2011
ANSWER 1. This is a large and loaded question. Essentially your answer boils down to one thing: You need to access Windows Shares using Samba, not via SSH. SSH is a protocol which mainly gives you interactive access to a remote shell session. There is also SCP which is a specific SSH derived protocol which can be used to Copy files between systems using SSH encryption. To use it the windows system must support SSH and SCP. I am sure there is some software to enable this.

Another possible answer is to get an NFS (Network File System) service installed on windows. You can then use that to allow the Linux system to mount the NFS file systems directly.

Samba is still the most commonly used solution. It has trouble with Active Directory, Windows Domain security is a quagmire of issues, but people generally manage to get it to work. Google is your friend.

ANSWER 2. The command "find" is your friend. It can be used to locate a file on the system, and it automatically searches in directories and sub-directories. To look for notepad1.txt somewhere in your home directory, try this command:

Code:
find ~ -name notepad1.txt

When it locates the file, it will output the path.

You can search the entire system, including all users like this:

Code:
find / -name notepad1.txt

This requires that you have permissions to look in all directories, so to give the command super-user rights, use sudo to increase the permissions for the command

Code:
sudo find / -name notepad1.txt

The first "thing" after the command "find" is where to look. The ~ means "My Own Home Directory". The / means the root of all the file systems. You could also specify a specific directory, such as /tmp , or even a list of directories to look in.

Once you learn its full use, the find command is very powerful, it can limit by file ownership, permissions, access and modification times, and it can perform formatting on its output. It can also be used to initiate programs on the selected (found) files.

ANSWER 3. I am not sure what you are looking for - Try the command "last"

For a specific IP address, try

Code:
last | grep 192.168.1.1

ANSWER 4. I am not sure of the meaning of this question. To know all your local IP addresses, try

Code:
ifconfig -a

To know all IP addresses recently observed, try

Code:
arp -n

To know all IP addresses which can respond to ping, try

Code:
ping -bn 192.168.1.255

This is the BROADCAST address. It does not always work because some people use firewalls and other means to prevent their systems from responding to ping.

I hope this all helps. Happy Linux'ing!
# 3  
Old 10-06-2011
thanx Hartz, sorry for late reply...

I've tried the last | grep 192.xxxxx
but the result was nothing.

and ifconfig -a to look just for local IP, not all existing IP on my network? like 192.168.1.1; 192.168.1.2; 192.168.1.3.....etc
cmiiw

the problem is, I have a server that its name xxx.lan (example), and I usually access from Windows
start-run \ \ xxx, and now... forget what its IP SmilieSmilieSmilie

now, can i know the IP xxx, and anyone who access that server? and also the Log?

many thnx
# 4  
Old 10-07-2011
I assume you did not try it with actual x'es ?

last will show hostnames in stead of IP addresses if it knows the hostname. In this case the grep command will find nothing, but you can specify the -i option to the last command to force it to print the IP addresses even when it knows the hostnames.

Example:
Code:
last -i | grep 192

Note: The "last" command shows logins, not other types of connection. If you are looking for a log of connections to an SMB (Samba) share I am sure there is a log somewhere - I would need to google it but will rather leave the answer to someone who knows Samba better than me.
# 5  
Old 10-07-2011
Quote:
Originally Posted by hartz
I assume you did not try it with actual x'es ?

last will show hostnames in stead of IP addresses if it knows the hostname. In this case the grep command will find nothing, but you can specify the -i option to the last command to force it to print the IP addresses even when it knows the hostnames.

Example:
Code:
last -i | grep 192

Note: The "last" command shows logins, not other types of connection. If you are looking for a log of connections to an SMB (Samba) share I am sure there is a log somewhere - I would need to google it but will rather leave the answer to someone who knows Samba better than me.

hi hartz, sorry for disturbing you again...Smilie

it still nothing (weird huh...). i've tried all various ways, like:

last -i | grep 192
last -i | grep 192.168.1
last -i ==> this just local pc

but, the good news my laptop is detect from another windows pc. any idea/ways to knows another IP in my network (LAN)?
# 6  
Old 10-08-2011
Quote:
Originally Posted by busoh.sensen
last -i ==> this just local pc
Are you sure that someone (you?) did log in into the Linux computer from another computer?

"last -i" shows ALL logins, from anywhere.

"last -i | grep 192" will filter the output from last -i and show only the lines which has got 192. The "| grep 192" is a second, independent command which filters the output from the first command.

Quote:
Originally Posted by busoh.sensen
but, the good news my laptop is detect from another windows pc. any idea/ways to knows another IP in my network (LAN)?
I am not sure that I understand the question. I did explain how to perform broadcast ping. What IP are you looking for?

To find out your own IP address on the Linux computer, run ifconfig.

On the Windows computer, install "putty". Putty can login to a remote Linux or Unix computer ... but only if the Linux computer is configured to allow logins from remotely.

In the good old days Linux computers used to allow this by default. Now many Linux distributions do not include the software to allow remote login by default. For example Ubuntu Server version includes an SSH daemon, but Ubuntu desktop version does not.

In Ubuntu or Debian or any derivative Linux or any linux that uses APT for software package management, run this command to install the SSH daemon:

sudo apt-get install sshd

Note: Many Unix services are called daemons.

It will find the software, download it, install it, configure it and activate it automatically.

To check if your computer allows remote login via SSH, run this command:

netstat -a | grep -i ssh

If there is something that states LISTENING then you can connect with an SSH client such as "Putty".

P.S You are not disturbing. Feel free to ask as many questions, but you should also try to google search to find these answers. I do know however that the "vocabulary" is new and in the beginning it is difficult to know what to google and how to sift through the plethora of results that you get. I still struggle with it and I've only been using Unix since 1989 and Linux since 1991.
This User Gave Thanks to hartz For This Post:
# 7  
Old 10-11-2011
hi hartz,

sorry for my language if very very bad... Smilie
now i know answer my question, with

Code:
nmap -sP 192.x.x.0/24

yeah ur right, i found my question after guggling it SmilieSmilie

thx hartz, many thanks...
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Redhat - network question

Hi, I am on Redhat 5. on the /etc/sysconfig/network file I don't see GATEWAY as one line. I also checked /etc/sysconfig/network-scripts/ifcfg-eth0. I don't see GATEWAY. But on the server. But when I do netstat -rn. I see many address. Is there some other settings ? ... (2 Replies)
Discussion started by: samnyc
2 Replies

2. IP Networking

Network question

Folks; I have 2 SUSE servers similar in all configuration & both on the same network (192.168.151.10 & 192.168.151.11) with the same default gateway of 192.168.151.1 and the same netmask of 255.255.255.0 and the same firewall configuration the first one works fine and i can ssh to it & i can... (3 Replies)
Discussion started by: Katkota
3 Replies

3. IP Networking

network question

Hi here is my question; any help would be appreciated The Linux system pokey has two Ethernet cards. The first Ethernet card is connected to a companywide TCP/IP network covering the addresses 87.65.43.xx, where pokey's address is 87.65.43.21. The second Ethernet interface is connected to a... (2 Replies)
Discussion started by: scofiled83
2 Replies

4. UNIX for Dummies Questions & Answers

multi-network question

Hi, I have a linux machine connected to 2 networks, with devices eth0 and eth1. When I give the command host whatever, how do I now which network is searched for the DNS's ? Is there a default ethernet device for network related commands ? How do I change it ? :confused: (2 Replies)
Discussion started by: mik
2 Replies

5. Solaris

Solaris 10 Network Question

I am new to Solaris and have been searching around for this answer and I think I figured it out but I wanted to run it by you folks. I was trying to figure out if the network on this Solaris 10 machine was set up for 100 Full Duplex. I think from this output that it is 100 full duplex, am I... (2 Replies)
Discussion started by: scotbuff
2 Replies

6. UNIX for Dummies Questions & Answers

network set up question

1) how do i know my NIC speed if its 10//100??? 2)how do i setup by NIC to full duplex 3) any help on setting up etherchannel for NIC failover (1 Reply)
Discussion started by: karthikosu
1 Replies

7. UNIX for Dummies Questions & Answers

Network noobie question

This is my first attempt in installing a netbsd ever. I'm trying to get myself familiar with some commands and how things work in unix and so far i never knew its this fun. Anyway, unix is our elective here in school and school is gonna start 2 weeks. I'm just trying to get a headstart on this :D... (2 Replies)
Discussion started by: 3rr0r_3rr0r
2 Replies

8. Solaris

Solaris Network question

I have a machine that has developed a strange network problem. Anytime it sends an FTP file somewherwe, no problem. When it is the target machine, extremely slow. I checked the /var/adm/messages file and found a few of these: SUNW,hme0 : No response from Ethernet network : Link down -- cable... (2 Replies)
Discussion started by: hshapiro
2 Replies

9. Linux

Red-hat AS 2.1 network question

I have setup a AS 2.1 server with no X running or installed. I need to know how to configure the IP and such from command line and change it from DHCP. We used DHCP at first since we didn't know the IP we were going to use and now I need to change it. Any help would be great as Redhat's site just... (2 Replies)
Discussion started by: Acleoma
2 Replies

10. UNIX for Dummies Questions & Answers

Network question

Hey, Just need a little help I'm not sure wat I should do. We have several little networks setup for testing different things. One of these networks we need to have running at full dulpex. Right now we run 2 hubs (to go off to 2 differnt parts) and they are half dulpex hubs. Is is... (1 Reply)
Discussion started by: merlin
1 Replies
Login or Register to Ask a Question