LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-19-2015, 01:04 AM   #1
milesy
LQ Newbie
 
Registered: Sep 2015
Posts: 2

Rep: Reputation: Disabled
vsftpd with rsa key


Hi all

Hoping this is going to be a nice easy one for my first post here.

I'm trying to set up vsftpd to use the same rsa key I use for ssh.

I've added the following to /etc/vsftpd.conf

# Encrypt FTP
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
rsa_cert_file=/home/tinkerdev/.ssh/authorized_keys

The rsa_cert_file is the location of the public key I use for ssh

Imported private key into Filezilla but it just gives an ECONNREFUSED

However I noticed if I use port 22 it works. Looks as if it's skipping vsftpd altogether. Didn't know you could do that, or quite why it works for that matter.

I've looked about /var/log but couldn't find any error messages about it.

I feel though I've made a basic mistake somewhere but without error messages I'm left stumped.

Last edited by milesy; 09-19-2015 at 01:10 AM.
 
Old 09-19-2015, 03:30 AM   #2
goodhombre
Member
 
Registered: Mar 2010
Location: Ungheni, Rep. Moldova
Distribution: Ubuntu
Posts: 89

Rep: Reputation: 22
Quote:
Originally Posted by milesy View Post
Hi all

Hoping this is going to be a nice easy one for my first post here.

I'm trying to set up vsftpd to use the same rsa key I use for ssh.

I've added the following to /etc/vsftpd.conf

# Encrypt FTP
ssl_enable=YES
allow_anon_ssl=NO
force_local_data_ssl=YES
force_local_logins_ssl=YES
ssl_tlsv1=YES
ssl_sslv2=YES
ssl_sslv3=YES
rsa_cert_file=/home/tinkerdev/.ssh/authorized_keys

The rsa_cert_file is the location of the public key I use for ssh

Imported private key into Filezilla but it just gives an ECONNREFUSED

However I noticed if I use port 22 it works. Looks as if it's skipping vsftpd altogether. Didn't know you could do that, or quite why it works for that matter.

I've looked about /var/log but couldn't find any error messages about it.

I feel though I've made a basic mistake somewhere but without error messages I'm left stumped.
Hi milesy,

The things are little bit different and it is easy to get it wrong. When you configure vsftp to use SSL you provide means encrypted connections to the server, for more info check this :

https://www.digitalocean.com/communi...-an-ubuntu-vps

If you want to use a RSA key to connect to the server with Filezilla you have to connect to SSH server which by default runs on port 22.
 
1 members found this post helpful.
Old 09-19-2015, 01:14 PM   #3
JeremyBoden
Senior Member
 
Registered: Nov 2011
Location: London, UK
Distribution: Debian
Posts: 1,651

Rep: Reputation: 360Reputation: 360Reputation: 360Reputation: 360
Why not just use
Code:
sftp
in place of
Code:
ftp
This will use your ssh configuration to run ftp securely.
Hopefully, you won't need to set any additional restrictions.

Last edited by JeremyBoden; 09-19-2015 at 01:16 PM.
 
Old 09-19-2015, 02:20 PM   #4
milesy
LQ Newbie
 
Registered: Sep 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by goodhombre View Post
If you want to use a RSA key to connect to the server with Filezilla you have to connect to SSH server which by default runs on port 22.
Well this is what I was trying to achieve so I'll just use port 22 then. Thanks for the help.
 
  


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
Any other method of generating pub key attenuation other than rsa key sanjay87 Linux - Server 1 03-29-2012 10:21 AM
Starting vsftpd for vsftpd: 500 OOPS: SSL: cannot load RSA certificate MisterTickle Linux - Server 2 02-11-2011 08:41 PM
Putty/SSH login failed when using RSA public key: 'Server refused our key' itsecx@gmail.com Linux - Server 10 10-04-2010 02:19 PM
Setting up FTP access to vsftpd through RSA/SSH Key mchethan Linux - Newbie 1 02-25-2009 06:02 AM
RSA public key encryption/private key decription koningshoed Linux - Security 1 08-08-2002 08:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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