LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > 4MLinux
User Name
Password
4MLinux This forum is for the discussion of 4MLinux.

Notices


Reply
  Search this Thread
Old 03-24-2017, 11:18 AM   #1
genek
LQ Newbie
 
Registered: Mar 2017
Posts: 9

Rep: Reputation: Disabled
upload files - SSH & FTP servers


Hi. I try ssh and ftp servers.

SSH: I can login into bash, but I cant login over winscp using SFTP protocol. I can login using SCP protocol, but I can't upload files. I get note: no scp transmission allowed...

FTP: ftp starts, I can log into default account. Again a can't upload any file. Where is configuration file of ftp deamon?

I'd like get to know resolution of both problems...
 
Old 03-24-2017, 12:17 PM   #2
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 639

Rep: Reputation: 131Reputation: 131
Hi,

1) Which 4MLinux version?
2) Please post the output of the "server" command here.
3) Are you trying to connect to the 4MLinux server or from the 4MLinux server ?

.
 
Old 03-24-2017, 12:53 PM   #3
genek
LQ Newbie
 
Registered: Mar 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
ver 21.0 march 2017
I want connect TO 4mlinux from windows station and winscp.exe

SFTP port22 connection - no naswer & closed connection at once
SCP port22 connection - I can log in, I can list directories, /via scp connection of winscp.exe/ but when I try upload - "Cannot execute scp to start transfer. Please make sure, that SCP is installed on the server and path to it is included in PATH. You may also try SFTP instead of SCP. Command failed with return code 127."

FTP /also with winscp.exe/: I can login to default account without password & I can see test.html file. I can download it but I cant upload anything "Copying files to remote side failed. Unknown command"
 
Old 03-24-2017, 12:56 PM   #4
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 639

Rep: Reputation: 131Reputation: 131
And the output of the "server" command is...
 
Old 03-24-2017, 01:32 PM   #5
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 639

Rep: Reputation: 131Reputation: 131
Quote:
Originally Posted by zk1234 View Post
And the output of the "server" command is...
Log in into your 4MLinux and execute the "server" command in terminal. What is the output ?

.
 
Old 03-25-2017, 06:25 AM   #6
genek
LQ Newbie
 
Registered: Mar 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
Nothing special - only info that they are running...

List of servers:
firewall --> iptables (4MLinux Firewall)
ftpd --> BusyBox (via inetd)
httpd --> BusyBox (via inetd)
proxy --> Polipo (standalone)
smtpd --> not installed
sshd --> OpenSSH (via inetd)
telnetd --> BusyBox (via inetd)

Examples how to use them:
ftpd start --> start FTP server
ftpd stop --> stop FTP server
ftpd restart --> restart FTP server
ftpd test --> test FTP server

serverd start --> start all servers
serverd stop --> stop all servers
serverd restart --> restart all servers
serverd test --> test all servers

PHP support in Apache (if installed) is enabled by default.
Stunnel and MariaDB (if installed) are started automatically by httpd.
See also: /etc/firewall /etc/httpd /etc/inetd /etc/php /etc/polipo /etc/server
 
Old 03-25-2017, 11:03 AM   #7
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 639

Rep: Reputation: 131Reputation: 131
Quote:
Originally Posted by genek View Post
Nothing special - only info that they are running...

List of servers:
firewall --> iptables (4MLinux Firewall)
ftpd --> BusyBox (via inetd)
httpd --> BusyBox (via inetd)
proxy --> Polipo (standalone)
smtpd --> not installed
sshd --> OpenSSH (via inetd)
telnetd --> BusyBox (via inetd)

Examples how to use them:
ftpd start --> start FTP server
ftpd stop --> stop FTP server
ftpd restart --> restart FTP server
ftpd test --> test FTP server

serverd start --> start all servers
serverd stop --> stop all servers
serverd restart --> restart all servers
serverd test --> test all servers

PHP support in Apache (if installed) is enabled by default.
Stunnel and MariaDB (if installed) are started automatically by httpd.
See also: /etc/firewall /etc/httpd /etc/inetd /etc/php /etc/polipo /etc/server
This means that no optional server software is installed (you can find it on the 4MLinux installation CD and online:
https://sourceforge.net/projects/lin...0/addons/lamp/

FTP
BusyBox acts as an anonymous FTP server with uploading disabled by default. Execute the "upload" command to enable uploading. You can add this command at the very end of the /etc/init.d/autostart.sh file to make this change permanent.

SFTP
By default the OpenSSH server is started at boot so you should be able to connect. See also:
http://www.linuxquestions.org/questi...er-4175583588/

SCP
Not supported.

You can also have a look at /var/log/messages. Additionally, each of the servers included in 4MLinux has the built-in self-testing procedure (see the output of the "server" command posted by you).

.
 
Old 03-25-2017, 11:22 AM   #8
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 639

Rep: Reputation: 131Reputation: 131
And by the way:
You wrote that you had used WinSCP to connect. I am a big fun of this program. It's available in 4MLinux via Wine (Menu -> Extensions -> Wine -> Apps -> WinSCP)

.
 
Old 03-27-2017, 06:06 AM   #9
genek
LQ Newbie
 
Registered: Mar 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
I have got the problem closer!

sftp via ssh works for root only!
for other user doesn't work

It's from /var/log/messagess:

Quote:
Mar 27 10:45:39 4MLinux auth.info ssh-server[15238]: Accepted password for root from 172.16.1.4 port 50650 ssh2
//all OK

Mar 27 10:48:18 4MLinux auth.info ssh-server[15289]: Failed password for zapasow y from 172.16.1.4 port 50655 ssh2
//bed password

Mar 27 10:47:10 4MLinux auth.info ssh-server[15265]: Accepted password for zapas owy from 172.16.1.4 port 50651 ssh2
//good password for other user BUT DONT WORK - connection is closed at once
Why doesn't work for zapasowy user? I can log into zapasowy for ssh session but not for sftp via winscp.

full log
Quote:
Mar 25 11:24:05 4MLinux auth.info ssh-server[14344]: lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory
Mar 25 11:24:05 4MLinux auth.info ssh-server[14344]: lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory
Mar 27 10:45:39 4MLinux auth.info ssh-server[15238]: Accepted password for root from 172.16.1.4 port 50650 ssh2
Mar 27 10:47:10 4MLinux auth.info ssh-server[15265]: Accepted password for zapas owy from 172.16.1.4 port 50651 ssh2
Mar 27 10:47:46 4MLinux auth.info ssh-server[15269]: Accepted password for zapas owy from 172.16.1.4 port 50653 ssh2
Mar 27 10:48:08 4MLinux auth.info ssh-server[15285]: Accepted password for zapas owy from 172.16.1.4 port 50654 ssh2
Mar 27 10:48:18 4MLinux auth.info ssh-server[15289]: Failed password for zapasow y from 172.16.1.4 port 50655 ssh2
Mar 27 10:48:21 4MLinux auth.info ssh-server[15289]: Accepted password for zapas owy from 172.16.1.4 port 50655 ssh2
Mar 27 10:48:48 4MLinux auth.info ssh-server[15294]: Accepted password for root from 172.16.1.4 port 50656 ssh2
Mar 27 10:49:00 4MLinux user.info kernel: nf_conntrack version 0.5.0 (15677 buck ets, 62708 max)
Mar 27 10:49:05 4MLinux user.info kernel: nf_conntrack: automatic helper assignm ent is deprecated and it will be removed soon. Use the iptables CT target to att ach helpers instead.
Mar 27 10:49:32 4MLinux auth.info ssh-server[15369]: WARNING: could open open /u sr/local/etc/moduli (No such file or directory), using fixed modulus
Mar 27 10:49:42 4MLinux auth.info ssh-server[15369]: Accepted password for root from 172.16.1.4 port 50661 ssh2
Mar 27 10:49:42 4MLinux auth.info ssh-server[15371]: lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory
Mar 27 10:49:42 4MLinux auth.info ssh-server[15371]: lastlog_openseek: Couldn't stat /var/log/lastlog: No such file or directory

 
Old 03-27-2017, 06:31 AM   #10
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 639

Rep: Reputation: 131Reputation: 131
http://www.linuxquestions.org/questi...er-4175581471/
 
1 members found this post helpful.
Old 03-27-2017, 06:54 AM   #11
genek
LQ Newbie
 
Registered: Mar 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
Only for root...
BUT

I have added user zapasowy. And I now changed /etc/password

Quote:
zapasowy:x:1016:1016:Linux User,,,:/home/zapasowy:/bin/bash

by line

zapasowy:x:1016:0:Linux User,,,:/home/zapasowy:/bin/bash
Gruop 0 is for root.

Now all works properly BUT with root priviledges.

Thank You for help.

How can I close this thread?

Last edited by genek; 03-27-2017 at 06:56 AM.
 
1 members found this post helpful.
Old 03-27-2017, 06:56 AM   #12
genek
LQ Newbie
 
Registered: Mar 2017
Posts: 9

Original Poster
Rep: Reputation: Disabled
BTW - great distro.
Świetna robota

Last edited by genek; 03-27-2017 at 06:58 AM.
 
Old 03-27-2017, 07:10 AM   #13
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 639

Rep: Reputation: 131Reputation: 131
Quote:
Originally Posted by genek View Post
BTW - great distro.
Świetna robota
Dzięki!
(Thanks!)

.
 
Old 03-27-2017, 07:16 AM   #14
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 639

Rep: Reputation: 131Reputation: 131
Quote:
Originally Posted by genek View Post
How can I close this thread?
Thread Tools --> Mark this thread as solved
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] could not upload ftp files ah_gal06 Linux - Newbie 7 08-17-2009 09:44 AM
C++: how to upload files using ftp matiasar Programming 3 02-25-2009 05:01 AM
Not able to upload files through FTP in Linux thiagarn Linux - Newbie 3 02-24-2008 09:53 PM
[SOLVED] Upload Ftp & IpTables. AleLinuxBSD Linux - Security 11 03-30-2007 02:53 AM
upload files on ftp zafar466 Programming 2 12-14-2006 07:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > 4MLinux

All times are GMT -5. The time now is 04:58 AM.

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