LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   use putty connect my linux machine (https://www.linuxquestions.org/questions/linux-newbie-8/use-putty-connect-my-linux-machine-699939/)

yang_wayne 01-26-2009 09:10 AM

use putty connect my linux machine
 
I have just installed SUSE Linux Enterprice Server 10. I think the network is working. I can ping other server from this new installed server, I can also ping the new server from ohter server. But I can not connect new installed server with putty. Why? Also, when I type ps - A | grep 'ftp', it seems no ftp server is working. How to start ftp server?

Thanks,

Lisa

rsciw 01-26-2009 09:17 AM

did you set up SSH / OpenSSH on your linux box?

depending on distro, ftp servers aren't started by default.
check your ftp config how they're started.

often ftp servers are also only 'started' when a connect is made to the ftp port via inetd.
in proftpd for example you can set that in the config file, others should be similar

r3sistance 01-26-2009 09:24 AM

I might suggest either sshd is not running or port 22 is not open/being listened on correctly. Try running "ssh localhost" to test if sshd is correctly running.

FTP can be very dangerous so it's generally not enabled by default, a safer option is SCP which is included in the SSH Daemon and works over the same port as SSH with the same encryption.

Matey 01-26-2009 09:29 AM

too little info....
can you ping google.com or yahoo.com too?
any way I guess you have a problem with your subnet settings!?

what class of IP addressing scheme are you using? like if you use class C , usually your subnet mask is 255.255.255.0
if you are connected to the internet you have to use privates IP addresses (if you do not have a registered address from Internic). and every other machine on the network has to follow the same rules Unless you have a gateway that connects your LANs together.
are you running the ftp daemon?
ftpd

jschiwal 01-26-2009 09:34 AM

If a service is installed, then you can start most services with "sudo /usr/sbin/rc<service-name>".

To configure a service to start with certain run levels use "sudo /sbin/chkconfig <service> <runlevels>"

For example:
sudo /sbin/chkconfig vsftpd 35

It doesn't seem that you have configured ssh or vsftpd. For vsftpd, there is a "system-config-vsftd" package you can use that installs a /usr/bin/system-config-vsftpd graphical configuration wizard.

For ssh, you need to configure /etc/ssh/sshd_config on your server and create a key pair in your home directory on the server (if you use public key authentication). You can use putty's keygen program to create a key pair for your putty client as well. Then load in the private key, and have an openssh compatible public key displayed at the top of the program; which you can copy & paste to provide a public key entry for your ~/.ssh/authorized_keys file in the server. Also look at the comment instructions in the sshd_config file (just above the UsePAM line) for instructions on settings to use for PublicKey only authentication. Also consider "AllowUsers" to further lock down your server. If you don't need server <-> server cron jobs, then consider disabling root ssh logins.

good Luck!

yang_wayne 01-26-2009 09:40 AM

When I run 'ssh localhost',
The authenticity of host 'localhost' (127.0.0.1) can't be established. RSA key fingerprint is XXXXXXXX Aer you sure you want to continue connecting (yes/no?) I typed yes. Then, ask for password.

I don't know how to start ftp server.


Thanks,


Lisa

jschiwal 01-26-2009 09:46 AM

You should be using "ssh <username@host>" to connect from a remote computer to the server. If you are on the server, then you don't need to use ssh since you are already using a terminal on the server. localhost means the same machine. If your server is named "localhost", then you didn't set a hostname and should do that.

Which ftp daemon did you install? I gave the answer for starting the vsftpd daemon, which is an ftp server. If you installed the generic ftp server then use "ftpd" instead of "vsftp". The chkconfig command I gave will configure it to start at runlevels 3 and 5, as well as start the service.

Also as indicated, make sure that the ports are open. Run "sudo /sbin/yast2 firewall" if they aren't. ( or run yast2 and select the SuSEfirewall module ).

If you will be administering a Linux server at work, and you don't use a Linux workstation (a shame), I would at least install Cygwin/X on your windows workstation. Then you can use the same openssh client that you would from Linux. This will allow you to run graphical apps remotely as well via ssh, including running YaST2. This might save a trip to the server!

yang_wayne 01-26-2009 09:52 AM

create a key pair in your home directory on the server ? I don't know how to do it. I found it is too complicated to me. Why there is no SSH configuration setting when I installed. I thought last time I installed SUSE, everything was fine.

r3sistance 01-26-2009 09:58 AM

That's only if your using public key authentication which I suspect you don't, I would check the firewall as jschiwal stated how to do (I don't know Suse after all), just to check you did ssh localhost on the server rather then the client of this ssh relationship. If so then sshd appears to be working.

As for FTP, you have to install a daemon if one is not present and then set it up. FTP is generally not enabled/installed by default but can be installed in an optional package on most installers, FTP is completely unsecure thus why most distributions don't automatically start it up from the start.

yang_wayne 01-26-2009 10:19 AM

Hi, thanks for all your reply. When I installed SLES, I just chose all the default softwares to installed. I may ask a stupid question. How can I know if ftp is installed or not?

Thanks,

Lisa

dbogdan 01-26-2009 10:44 AM

What version of SLES did you install ?

SLES10 SP2 installs SSH, but disables it by default

You can easily user yast to enable/configure/ SSH and FTP as well as adding allowed ports to the firewall.

yang_wayne 01-26-2009 11:19 AM

I installed SLES10 sp2. How to enalble/configure SSH and FTP. Would you please list a detailed steps? I am really new to Linux.

Thanks,


Lisa

yang_wayne 01-26-2009 12:53 PM

Actually, I found the reason. Firewall defaully set up as start. After I stop it, ftp and ssh works.


Lisa

r3sistance 01-26-2009 02:18 PM

Just to note, It'd be safer to turn the firewall on and instead open ports 21 (ftp) and 22 (ssh). I did say it fairly early on it'd very likely be one of the two things and turns out it was port 22 being blocked then.


All times are GMT -5. The time now is 10:59 AM.