LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2012, 06:14 AM   #1
chesh9
LQ Newbie
 
Registered: Sep 2012
Posts: 17

Rep: Reputation: Disabled
newbie question - ssh tunnels, putty and sooo much more


hi guys,

This question may well belong in the newbie section, but this category seemed better suited.

I am almost completely new to linux I have no experience of working in code, but am trying to teach myself using Google and related forums and have to say I am loving it so far!

Although I am now pulling my hair out trying to create a file server on Mint.

I have installed the latest version of Mint on to an old optiplex box that I want to use as a remotely accessible server purely as a dumping ground for all my photographs.

I have downloaded Apache2, a SSH client amongst loads of other packages that I have downloaded from articles found on google.

The optiplex box is hard wired to the router.

I am using putty on a windows laptop, and trying to connect directly to the optiplex box, but I cant establish a connection. In fact I dont even get the password box to appear, all I get is connection timed out error.

The Optiplex box running linux is able to connect to the net...

please can somebody help!! what am I doing wrong!!??

keep the replies simple please

kindest regards

chris
 
Old 09-29-2012, 10:27 AM   #2
MCD555
Member
 
Registered: May 2009
Location: Milan, Italy
Distribution: Ubuntu, Debian, Fedora, Oracle Linux
Posts: 109

Rep: Reputation: 10
Hi Chris,

first step, you need to log into your linux mint via ssh, do you?
In this case you need to verify:

a. sshd is up and running on mint
you can do easily check this with the command:
Code:
   sudo service sshd status
if sshd is up and running you should get something like this:
Code:
   openssh-daemon (pid   [nnn]) is running...
otherwise you need to install and configure that!

b. there is a firewall that block your putty request
remember, you get a timeout (not a reset, so maybe a firewall is protecting your server (the other option would be a routing problem ...)
I assume you have iptables to protect your linux box so to verify this you could:
Code:
   sudo service iptables status
if you get something like iptables [xxx] is running you can simply stop it
Code:
   sudo service iptables stop
and try to "putty" again ... you should get (at least) a resopnse now!

You could help us to help you specifing also the (private) ip addresses of your boxes (linux and windows and so) and may tell us about how their connected (via a router/switch/ap and so).

This are the first checks that should help you to solve this issue ... or I hope so!

Once this problem will be solved you can go further!

Ciao
 
Old 09-29-2012, 11:40 AM   #3
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 24,240

Rep: Reputation: 7957Reputation: 7957Reputation: 7957Reputation: 7957Reputation: 7957Reputation: 7957Reputation: 7957Reputation: 7957Reputation: 7957Reputation: 7957Reputation: 7957
duplicate of http://www.linuxquestions.org/questi...re-4175429580/
 
Old 09-30-2012, 02:33 PM   #4
chesh9
LQ Newbie
 
Registered: Sep 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
thanks for all your responses guys, will give it a try at work tomorrow and report back.
kindest regards

chris
 
Old 10-01-2012, 10:15 AM   #5
chesh9
LQ Newbie
 
Registered: Sep 2012
Posts: 17

Original Poster
Rep: Reputation: Disabled
thank you for the suggestion mcd555, but none of those commands work for some reason,

i get :

sudo service sshd status
sshd unrecognised service

sudo service iptables status
iptables unrecognised service

any further ideas?

chris
 
Old 10-02-2012, 03:15 AM   #6
MCD555
Member
 
Registered: May 2009
Location: Milan, Italy
Distribution: Ubuntu, Debian, Fedora, Oracle Linux
Posts: 109

Rep: Reputation: 10
Well,

an alternative to verify if ssh is up and running is a simple netstat command:

Code:
netstat -tlpn
if there is a 22 port listed your secure shell is up (note that this is true if you didn't change the ssh default port!).
This is my output:

Code:
~ $ netstat -tlpn
(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      -               
tcp        0      0 127.0.0.1:631           0.0.0.0:*               LISTEN      -               
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      -               
tcp6       0      0 :::22                   :::*                    LISTEN      -               
tcp6       0      0 ::1:631                 :::*                    LISTEN      -
In the Mint distro the correct command for service is this:

Code:
sudo service ssh status
I've got this:
Code:
~ $ sudo service ssh status
ssh start/running, process 373
If you want the entire list of services running in your linux box:

Code:
sudo service --status-all
so you can take a look of what is running on.

Let us know!
 
Old 10-04-2012, 02:32 PM   #7
kremlar
LQ Newbie
 
Registered: Jun 2003
Posts: 8

Rep: Reputation: 0
I would check into the following:

1. Can you ping this box from other places on the network?

2. Is sshd running? 'cat /var/run/sshd.pid', 'top -p <that pid number>'

3. Is sshd successfully listening on a port?
'netstat -lp' should yield a line somewhere in there that looks like this:
tcp 0 0 *:ssh *:* LISTEN 284/sshd

4. Does /etc/hosts.allow have an entry for sshd?
sshd: ALL
or
sshd: 192.168. (or whatever your network is, etc).
 
  


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
ssh tunnels question philosophia Linux - Newbie 2 01-29-2010 03:03 PM
question about VI/VIM and ssh via putty Lleb_KCir Linux - Software 6 06-25-2009 07:03 AM
An abstract question on port forwarding and ssh tunnels. uncle-c Linux - Newbie 1 11-03-2007 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02: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
Open Source Consulting | Domain Registration