Operating System - OpenVMS
1753546 Members
5565 Online
108795 Solutions
New Discussion юеВ

incorrect sys$login value during sftp session

 
SOLVED
Go to solution
Gilles Pion
Advisor

incorrect sys$login value during sftp session

Hello all,
I'm looking for help on a sftp problem found on our configuration.

Context:
* tcpip show version gives:
VMS/tcpip version:
HP TCP/IP Services for OpenVMS Alpha Version V5.4 - ECO 6
on a AlphaServer ES40 running OpenVMS V7.3-2
* sftp "-V" gives:
$1$dga600:[sys0.syscommon.][sysexe]tcpip$ssh_sftp2.exe: SSH Secure Shell OpenVMS
(V5.5) 3.2.0 on AlphaServer ES40 - VMS V7.3-2


Evidence:
inside sftp session, "cd sys$login" incorrectly set default directory to tcpip$ssh user home directory:
$ sftp
Connecting to ...
sftp> cd sys$login
sftp> pwd
Remote working directory: /SYS$SYSDEVICE/tcpip$ssh <- incorrect

Before logging a support call I would like to know if someone using a more recent tcp/ip version could check if this has been fixed or not.


--
Gilles
6 REPLIES 6
Wim Van den Wyngaert
Honored Contributor

Re: incorrect sys$login value during sftp session

This is expected behaviour I think.

The SFTP process is a detached process. It has not all logicals of an interactive process. So, sys$scratch, sys$login are missing.

Wim
Wim
Wim Van den Wyngaert
Honored Contributor

Re: incorrect sys$login value during sftp session

You can however define sys$login for "Other" processes in your login.com. I tried it on multinet and that works. But by default the location is in sys$login of the user (but without the logical sys$login) !

Wim
Wim
Richard Whalen
Honored Contributor

Re: incorrect sys$login value during sftp session

MultiNet's (and TCPware's) SFTP server runs as a subprocess of a logged process that uses a fta device for a terminal. The MultiNet/TCPware SFTP server has all of the user's normal logical names available and runs with the user's identity so all of the normal VMS security functions work.
Wim Van den Wyngaert
Honored Contributor

Re: incorrect sys$login value during sftp session

Richard is right. Multinet has sys$login and sys$scratch defined. And mode returned "OTHER" which I translated to detached. But I guess the HP version could be different.
Replace in the following xxx by the process id created for your sftp session.

$ ana/sys
set proc/id=xxx
$clue proc/logical

and check for yourself.

Wim
Wim
Gilles Pion
Advisor

Re: incorrect sys$login value during sftp session

I had previously already defined sys$login and sys$scratch inside sylogin with the following commands:
$ if f$trnlnm("sys$login") .eqs. "" then -
define/job sys$login 'f$environment("default")
$ if f$trnlnm("sys$scratch") .eqs. "" then -
define/job sys$scratch 'f$environment("default")

So the problem is not sys$login undefined but having an invalid value.

But further investigations show that things are even more strange:
"cd sys$login" works fine if the sftp client is running on another vms host,
it doesn't work when coming from a solaris host using openssh or from Windows PC using putty's psftp command!

Weird...
Wim Van den Wyngaert
Honored Contributor
Solution

Re: incorrect sys$login value during sftp session

I checked it with 5.3 eco 2 with eak.

In multinet you get a process logical sys$scratch and sys$login.

In HP you get a job logical sys$login and sys$scratch. Both pointing to what you found. Thus you found an error.

Also the login.com is not executed. So, it doesn't know your environment.

Wim
Wim