LinuxQuestions.org
Visit the LQ Articles and Editorials section
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-13-2003, 07:24 PM   #1
time112852
Member
 
Registered: Aug 2003
Location: Pennsylvania, USA
Distribution: Gentoo 2.6.30
Posts: 92

Rep: Reputation: 15
Talking SSH connection Windows to Linux


Can someone tell me how to configure an SSH connection so that i can have a root shell to my slackware linux 9.0 server?

I tried searching but i couldnt find anything...

Thanks
 
Old 09-13-2003, 11:11 PM   #2
ugenn
Member
 
Registered: Apr 2002
Posts: 549

Rep: Reputation: 30
i'm not really familiar with Mandrake but does the ssh server use PAM? if it did u need edit the /etc/pam.d/sshd pam config and
remove a line that says something like...

auth required pam_securetty.so

note: it's not recommended to allow root logins unless the machine's are in a trusted network.

Last edited by ugenn; 09-13-2003 at 11:12 PM.
 
Old 09-14-2003, 08:40 AM   #3
Hangdog42
LQ Veteran
 
Registered: Feb 2003
Location: Maryland
Distribution: Slackware
Posts: 7,778
Blog Entries: 1

Rep: Reputation: 412Reputation: 412Reputation: 412Reputation: 412Reputation: 412
You don't need a root shell. Just log in as a regular user and su when you need root privileges.
 
Old 09-14-2003, 10:07 AM   #4
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
To allow root to logon via SSH, you will need to edit /etc/ssh/sshd_config and change the PermitRootLogin line to yes.
Code:
PermitRootLogin yes
 
Old 09-14-2003, 11:36 AM   #5
time112852
Member
 
Registered: Aug 2003
Location: Pennsylvania, USA
Distribution: Gentoo 2.6.30
Posts: 92

Original Poster
Rep: Reputation: 15
Actually this was really easy...all i needed to so was load the sshd daemon...now i can connect.

One thing though...how do i get X11 Forwarding to work? That means i can get a remote desktop right? I edited the sshd_config file, but i cant get X to start remotely. Well, it starts, but the screen doesnt show remotely.

What is a good SSH utility that i can run from a command prompt?

Thanks.
 
Old 09-14-2003, 12:16 PM   #6
Amir
LQ Newbie
 
Registered: May 2003
Distribution: Red Hat 9
Posts: 22

Rep: Reputation: 15
PUTTY!

putty is the best if you want to access your linux computer from a windows one.

just go to google.com and type "putty" in the search and you'll find a site where you can download it.
 
Old 09-14-2003, 12:17 PM   #7
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 328

Rep: Reputation: 31
X11 forwarding means that if you run a X server on your Win box, you can start X11 apps on your linux box and the window will pop up on your screen. You need to actually run such a thing on Windows, and then specify that you want to enable X11 forwarding. The latter is sometimes on, sometimes off, depending on the client you use, and sometimes it it sensitive to the existence of the $DISPLAY env. variable.

My favorite is the cygwin package (www.cygwin.com), you get a shell with nice unix commands, ssh among them (you need to say in the installation gui that you want that).

Hope it helps,
mlp
 
Old 09-14-2003, 12:24 PM   #8
time112852
Member
 
Registered: Aug 2003
Location: Pennsylvania, USA
Distribution: Gentoo 2.6.30
Posts: 92

Original Poster
Rep: Reputation: 15
Yeah i have been using putty..but i cant seem to get X11 Forwarding to work on it.

Also, with my sshd_config file..each line has a # next to it...do i keep that in there or is it making each line a comment?
 
Old 09-14-2003, 02:03 PM   #9
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 328

Rep: Reputation: 31
The # makes it a comment. But (I'm running RH, it may be different with SW) the commented-out options represent the default that sshd has. Make it
X11Forwarding yes
in the file (then restart sshd).

I don't use putty, so I don't know offhand how to control forwarding. cygwin's ssh lets you give all usual options, such as -v to actually see what's going on. Note that the forwarding is controlled on *both* sides, the server can allow or deny it, and the client can ask for it or not. You can make your desired behavior (with cygwin) the default with a file ~/.ssh/config, mine reads

Quote:
more .ssh/config
ForwardAgent yes
ForwardX11 yes
$
I'm sure putty has the same capabilities, just that I don't use it.

mlp
 
Old 09-14-2003, 02:42 PM   #10
time112852
Member
 
Registered: Aug 2003
Location: Pennsylvania, USA
Distribution: Gentoo 2.6.30
Posts: 92

Original Poster
Rep: Reputation: 15
I downloaded cygwin..but how do i get ssh to work with it?
 
Old 09-14-2003, 07:28 PM   #11
mlp68
Member
 
Registered: Jun 2002
Location: NY
Distribution: Gentoo,RH
Posts: 328

Rep: Reputation: 31
When you installed, you are presented with a choice of packages to install. Did you add openssh as I said before? If so, you should have the ssh command available in the cygwin shell.

mlp
 
Old 09-19-2003, 02:11 AM   #12
Robert0380
Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
Quote:
Originally posted by time112852
Yeah i have been using putty..but i cant seem to get X11 Forwarding to work on it.
you have to run an X server on the windows machine as well.

example:

x-win32 (u can get an eval version that shuts off every 15 minutes)



you'd have to run that (it runs in the background) and then also in putty turn on X-11 Forwarding. Turning on X-11 forwarding in putty alone won't do jack because putty does not come with an X-server.
 
  


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 connection from a Windows machine to a Linux machine pistachio Linux - Networking 1 08-30-2005 10:45 AM
restart linux from SSH connection? deWin Linux - Newbie 6 09-28-2004 10:22 PM
After an SSH connection with my Debian Server, My windows PC become isolated!!! jimesh Linux - Networking 2 09-08-2004 09:04 AM
i can get internet connection in windows but in LINUX there is no connection ruzvay Linux - Networking 2 06-08-2004 07:02 PM
SSH connection refused using linux box 90coders Linux - Security 3 10-18-2003 02:53 AM


All times are GMT -5. The time now is 01:40 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration