LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   4MLinux (https://www.linuxquestions.org/questions/4mlinux-115/)
-   -   upload files - SSH & FTP servers (https://www.linuxquestions.org/questions/4mlinux-115/upload-files-ssh-and-ftp-servers-4175602470/)

genek 03-24-2017 11:18 AM

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...

zk1234 03-24-2017 12:17 PM

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 ?

.

genek 03-24-2017 12:53 PM

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"

zk1234 03-24-2017 12:56 PM

And the output of the "server" command is...

zk1234 03-24-2017 01:32 PM

Quote:

Originally Posted by zk1234 (Post 5687826)
And the output of the "server" command is...

Log in into your 4MLinux and execute the "server" command in terminal. What is the output ?

.

genek 03-25-2017 06:25 AM

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

zk1234 03-25-2017 11:03 AM

Quote:

Originally Posted by genek (Post 5688050)
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).

.

zk1234 03-25-2017 11:22 AM

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)

.

genek 03-27-2017 06:06 AM

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



zk1234 03-27-2017 06:31 AM

http://www.linuxquestions.org/questi...er-4175581471/

genek 03-27-2017 06:54 AM

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?

genek 03-27-2017 06:56 AM

BTW - great distro.
Świetna robota :)

zk1234 03-27-2017 07:10 AM

Quote:

Originally Posted by genek (Post 5688739)
BTW - great distro.
Świetna robota :)

Dzięki!
(Thanks!)

.

zk1234 03-27-2017 07:16 AM

Quote:

Originally Posted by genek (Post 5688738)
How can I close this thread?

Thread Tools --> Mark this thread as solved


All times are GMT -5. The time now is 07:13 PM.