- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: weird sftp problem with csh
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2005 02:13 AM
01-25-2005 02:13 AM
weird sftp problem with csh
# Establish some terminal-dependent items
if ($?TERM == 0||$TERM == "unknown"||$TERM
== "network"||$TERM == "hp") then
setenv TERM vt100
setenv term vt100
endif
Any ideas why this simple statement breaks it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2005 03:31 AM
01-25-2005 03:31 AM
Re: weird sftp problem with csh
setenv term vt100
(just a hunch)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2005 03:54 AM
01-25-2005 03:54 AM
Re: weird sftp problem with csh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2005 04:19 AM
01-25-2005 04:19 AM
Re: weird sftp problem with csh
ssh yourhost /usr/bin/true
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2005 04:26 AM
01-25-2005 04:26 AM
Re: weird sftp problem with csh
The if command fails and outputs a message such as "TERM: Undefined variable.". If the shell tries to write something to the terminal it has become interactive and will kill sftp/ssh.
If you edit the cshrc and just before the if statement put
printenv > /tmp/foo
You can check if TERM is actually set (and to what) in the script. I'm not used to csh, but in ksh there is an option to report/not report access to environment variables that haven't been declared. You might need to turn it off in csh?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2005 04:35 AM
01-25-2005 04:35 AM
Re: weird sftp problem with csh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2005 04:46 AM
01-25-2005 04:46 AM
Re: weird sftp problem with csh
ttytype is smart enough to output the right commands depending on the setting for $SHELL. You never want to inherit TERM from a remote connection, especially if the remote user is not using another HP-UX system. Always let ttytype figure out the terminal type, and always bypass ttytype (and tabs, tset, stty, etc) if there is no real terminal (ie, a batch or cron job)
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2005 04:56 AM
01-25-2005 04:56 AM
Re: weird sftp problem with csh
I did figure out that separating the check for unset TERM, and the rest of the if statement works (it was obviously trying to complain DURING the if that TERM was not set), so problem is solved!!
Thanks for all of your help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2005 04:56 AM
01-25-2005 04:56 AM