LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 09-08-2010, 02:47 AM   #1
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
ssh host (get host, get domaine)


Dell Optiplex Gx-1 running Debian Lenny 5.04. I can connect to my debian machine using vncviewer on port 5900 windows machine. I can control the debian machine, Obviously my ssh is working(I believe) because I can scroll thru windows documents using debian.

I'm trying to connect to my Debian machine using ssh but also want to be able to connect and login upon powering up.

I have it set so far where if I let the debian machine sleep, I can connect and login only if it wasn't logged out.

How do I set it to where I don't have to have the machine logged in and either running or sleep. Also get connected on 22 instead of 5900.

Now about: (get host, get domain)

(get host & set hostname) isn't that supposed to be the name of debian machine or is it the other machine?
 
Old 09-08-2010, 02:59 AM   #2
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 216

Rep: Reputation: 35
Hi there,

vnc does not use the same port as ssh. Therefore, it is very well possible that the port 5900 is open, but 22 is closed. In this case, you would be able to connect to your remote PC throug vncviewer, but not with ssh.

To allow ssh connection, you must open port 22 in your firewall.

Cheers
 
Old 09-08-2010, 04:35 AM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I found this thread just now for opening 22:

http://ubuntuforums.org/images/misc/bgrepeat.jpg

https://help.ubuntu.com/htdocs/ubunt...bg-content.png

My laptop has a windows operating system will it find port 22 or will I have to make changes to settings on laptop as well?
 
Old 09-08-2010, 04:41 AM   #4
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 216

Rep: Reputation: 35
Hi there,

From MS, you might have to install a extra program (something PUTTY) to be able to connect ssh.

Cheers
 
Old 09-08-2010, 04:56 AM   #5
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I can install putty but is it more secure than vnc and will it give me the result of being to unassisted login (not having to have the computer in logged-in state or sleep?
 
Old 09-08-2010, 05:29 AM   #6
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 216

Rep: Reputation: 35
Hi there,

From the security point of view, ssh is definitely more secure than vnc. On top of it, you will gain a tremendous amount of speed, since ssh (secure shell) will make you have access only to the command line of your remote PC, while vnc sends a complete desktop over the network.

I don't quite understand what you mean by unassisted login. Once you remote computer is up, the network and ssh services running, you will be able to access it. With ssh, you definitely don't need to have your remote computer running an X-Window. You will only access it through the command line.

Of course (since this is probably your next question), you can have X forwarding over SSH. You will then loose the speed mentioned above, as counter party. To do so, when connecting to you remote PC, just add the -X option, like so:

Code:
ssh -X youName@yourPC.com
Hope this helps.

Cheers
 
Old 09-08-2010, 08:49 PM   #7
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Code:
I don't quite understand what you mean by unassisted login. Once you remote computer is up, the network aod ssh services running, you will be able to access it. With ssh, you definitely don't need to have your remote computer running an X-Window. You will only access it through the command line.
What I meant when I said assisted login is,with vnc I'm having I'm having to leave the debian machine in a logged in state. Instead of loggin out I just disconnect from the debian machine and allow it to go into hibernation when I'm ready I reconnect and login to the account that's hibernating.

BTW, thankyou for your help and information I've found it very helpful.
 
Old 09-09-2010, 02:44 AM   #8
fatra2
Member
 
Registered: Feb 2004
Location: Switzerland
Distribution: Fedora - RedHat - Mandrake - OpenSuse
Posts: 216

Rep: Reputation: 35
Hi there,

Quote:
Originally Posted by EDDY1 View Post
What I meant when I said assisted login is,with vnc I'm having I'm having to leave the debian machine in a logged in state. Instead of loggin out I just disconnect from the debian machine and allow it to go into hibernation when I'm ready I reconnect and login to the account that's hibernating.
That's because vnc is a graphical desktop sharing. The purpose of vnc (anyway my interpretation of it) is a tool that allows you to see what is going on on a remote desktop. Therefore, you need to have an X-window running. But it is not secure at all, except for the encryption of password.

For "real" work on a remote machine, you should use port 22 (secure shell). This allows you to login to the remote computer, as long as the network is up, and the ssh service is on. If other people are working from the same machine, it will not affect there work, except if you are taking the whole cpu.

If you are looking to start some GUI program (firefox, google-chrome, openoffice,...) from SSH, you will need to have the X forwarding enabled. This will result in an increase traffic over the network.

For security, ssh is one of the most secure connections.

Hope this helps. Cheers
 
Old 09-11-2010, 11:52 PM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
Ok, I've installed putty and I'm able to login but when I check my syslog record it's showing that I was logged into 1130, 1133 and 1134. They were at different times but that's how it happened. I'm going to go back to config file and uncomment 22 to see if that's the reason. It shows that it's listening on port 22 though. Like I said thanks for your assistance.
 
Old 09-12-2010, 12:06 AM   #10
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Original Poster
Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I uncommented port 22 and saved it, but, this time I logged into port 1145 is it common to log into different ports?

My next question is when I take my laptop to different locations how do I log in from a diifferent network? What do I need to include the router and mac address along with the internet address? I tried from a different location and couldn't connect.
 
  


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: connect to host .....No route to host soumyacs Linux - Newbie 5 10-27-2009 11:03 AM
try install host ; bind9-host uninstalled , how to undo sudo apt-get install host? shojaru Linux - Newbie 0 06-11-2009 01:45 AM
Fedora 10/unable to ssh out from box to remote host (SSH within LAN ok) huskeypm Linux - Networking 3 04-14-2009 08:37 PM
ssh + pop3 with kmail: Could not connect to host localhost, but ok without ssh Emmanuel_uk Linux - Networking 0 07-20-2006 05:56 PM
How to setup a host.deny and host.allow for SSH? explorer1979 Linux - Security 2 01-31-2005 06:28 PM


All times are GMT -5. The time now is 08:20 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