Welcome, Guest. Please login or register.
Did you miss your activation email?
+  pfSense Forum
|-+  pfSense English Support» General Questions» problem trying to sftp/scp PfSense router
Username:
Password:
 
 

Pages: [1]   Go Down
  Print  
Author Topic: problem trying to sftp/scp PfSense router  (Read 1620 times)
0 Members and 1 Guest are viewing this topic.
jorge.pelizzoni
Newbie
*
Offline Offline

Posts: 10


View Profile
« on: January 30, 2009, 09:39:43 am »

Hi, all!

First of all, congratulations on the great work you've been doing on
pfSense! Here is my problem: I've enabled ssh on my pfSense 1.2.2
router and am able to run ssh sessions on it normally. However, when
it comes to using sftp and scp I receive the following errors after
typing the password in:

(sftp) Received message too long 170535466
(scp) protocol error: unexpected <newline>

By googling around I learnt one possible reason for such errors is
pfSense might be echoeing anything (e.g. a menu) when logged in, which
sftp/scp do not expect. So I tried wrapping the whole contents of
/etc/rc.initial like this:

if [ ${TERM} = "menu" ]; then
   <original /etc/rc.initial>
fi

Now, when I try to use sftp/scp (and TERM is obviously != "menu") they do not complain anymore but the connection is closed right away and no desired effect can be observed. Any ideas how to fix this will be most appreciated. Thanks in advance.

Cheers,

Jorge.
Logged
jimp
Administrator
Hero Member
*****
Online Online

Posts: 3808



View Profile
« Reply #1 on: January 30, 2009, 10:00:43 am »

Try to connect with the username "root" instead of "admin", using the same password.
Logged

Co-Author of pfSense: The Definitive Guide.

Need help fast? Try Commercial Support.

Also check the Doc Wiki for additional information.
jorge.pelizzoni
Newbie
*
Offline Offline

Posts: 10


View Profile
« Reply #2 on: January 30, 2009, 12:38:25 pm »

Gosh! Thanks a lot for your reply! Just out of sheer curiosity: how is the difference between admin and root implemented?

Cheers,

Jorge.
Logged
jimp
Administrator
Hero Member
*****
Online Online

Posts: 3808



View Profile
« Reply #3 on: January 30, 2009, 01:01:22 pm »

Glad it helped  Smiley

From /etc/passwd:
Code:
root:*:0:0:Charlie &:/root:/bin/sh
admin:*:0:0:Admin User:/root:/etc/rc.initial

Root's shell is /bin/sh and has a .profile that calls /etc/rc.initial, but things like scp can still bypass .profile and execute another command.

Admin's shell is /etc/rc.initial directly, so it is locked into running that on each login.
Logged

Co-Author of pfSense: The Definitive Guide.

Need help fast? Try Commercial Support.

Also check the Doc Wiki for additional information.
Pages: [1]   Go Up
  Print  
 
Jump to:  

 

Page created in 0.399 seconds with 19 queries.