VectorLinux
October 25, 2014, 08:57:41 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: Unable to use sftp to VL 5.9 [SOLVED]  (Read 2059 times)
wcs
Packager
Vectorian
****
Posts: 1144


« on: August 09, 2008, 02:11:42 pm »

I'm trying to use gftp with ssh to access a VL 5.9 Std box.

The ssh part is fine, as I'm able to ssh to it.

But in gftp, it gives me an error message that reads something like "You are working as [username]": the stuff that gets echoed by /etc/profile.d/vasm.sh when logging in.

I tried the saulgoode fix here (I think the .bashrc one is already there, so I only tried in vasm.sh):
http://forum.vectorlinux.com/index.php?topic=4198.0

But I still get the same error.
Any ideas?

Thank you!
« Last Edit: August 10, 2008, 01:54:56 pm by wcs » Logged
exeterdad
Packager
Vectorian
****
Posts: 2046



« Reply #1 on: August 09, 2008, 06:11:57 pm »

I'm not savvy on this, but do you have a ftp server set up on the VL5.9 box, and is it set to use ssh?
Logged
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #2 on: August 09, 2008, 06:29:20 pm »

I don't. I wondered about that for a while.
But then, when taking out those lines in vasm.sh, I can connect using gftp, so that shouldn't be the problem.
Only then I lose that Terminal intro all the time.

Not that that initial information about some applications and the user name is that important, but I guess I got used to it.

And it bugs me that I don't know the solution...  Smiley
Logged
bigpaws
Vectorian
****
Posts: 1856


« Reply #3 on: August 09, 2008, 08:06:26 pm »

You should not need an FTP server setup. There are a couple things
to check first is the firewall, then the protocol there is ssh1 and ssh2.

Make sure that SSH is picked as the connection choice, and that the
port is right.

Next try pinging the host from the client to test the connection, remember
if ICMP is denied in the firewall ping will fail.

Traceroute may also be a good tool for you.

HTH

Bigpaws
Logged
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #4 on: August 10, 2008, 05:08:38 am »

Thanks for your answers!

Quote
There are a couple things to check first is the firewall

This is inside the same LAN, should've said that.
I'm using firestarter in the remote box, but open for the client's IP in that port.
No logged blocked events light up in Firestarter.

Quote
then the protocol there is ssh1 and ssh2

Only protocol 2 in the server (in /etc/ssh/sshd_config). In the client, I choose ssh2 in gftp (which I assume is Protocol 2).

Quote
if ICMP is denied in the firewall ping will fail.

It's not denied in Firestarter. Ping is denied in the router, but it seems to make no difference for access from within the LAN.

Quote
Next try pinging the host from the client to test the connection

Pings just fine.

Even an SSH connection from the terminal starts completely fine. The problem seems to be restricted to sftp (within gftp, with the option "-s sftp").
Logged
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #5 on: August 10, 2008, 05:12:20 am »

I think the problem is what is described here (3rd paragraph):
http://www.it.uu.se/datordrift/faq/ssh

When I try that fix in /etc/profile.d/vasm.sh, it does work.
But I lose the initial lines that are echoed when starting a terminal even from within the server itself.

In other words, I'm looking for a fix that prints out those lines ("You are working as username", "Frequently used programs", etc...) when I start a terminal in the server computer, but not when I sftp to it.

(those words might help my girlfriend as well... if she ever starts using a terminal  Smiley )
Logged
wcs
Packager
Vectorian
****
Posts: 1144


« Reply #6 on: August 10, 2008, 01:53:54 pm »

Ok, I got it sorted.

The fix that worked for me was putting all the echo lines in /etc/profile.d/vasm.sh inside

Code:
if ( tty -s ); then
...
Code:
fi

which evaluates as TRUE if the standard input is a display. When in sftp, it isn't. So no echos, no error.

The saulgoode fix in the other thread didn't work for me:
Code:
if [[ ! $(/usr/bin/tty >/dev/null) ]] ; then

nor did the fix in the webpage I mentioned:
Code:
if [ -n "$TTY" ]; then

although they should all do the same, no?  Huh

Whatever, it's solved now. Thanks all for the input!

This should really be fixed in the next Vector versions.
Apparently a similar fix was applied to .bashrc in 5.9, but not to vasm.sh.


« Last Edit: August 10, 2008, 01:55:45 pm by wcs » Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!