Topic "small fix for login fortunes, etc"

Author Message


When connecting to ssh, I have "fortune" in my .bashrc, which prints a little fortune. However winscp chews on this, because it makes the initial packet(s) too big and complains. Trivial fix is to check the type of terminal through environment variable in script, like:

# Fix for winscp
if [ "$TERM" != "dumb" ]; then

(putty and openssh emulate xterm, should work for other clients also - try "echo $TERM" to see)

Now winscp works and I get my fortunes in putty and so on. why winscp needs to launch bash at all, I don't know, maybe weirdness in ssh protocol, hah. anyway, hope that helps someone out Very Happy
[View user's profile]
Site Admin
Joined: 2002-12-10
Posts: 27059
Location: Prague, Czechia
You should read F.A.Q. to learn cause of your problems and also to learn that your solution is not the right one Smile
Martin Prikryl


I lose Embarassed

I always wondered the difference between .bash_profile and .bashrc, I get it now.. you learn something every day, I guess Confused

ps error message contains suggestion that .profile prints the message (the faq says .profile isn't executed for non-interactive), which made me think .bashrc and .bash_profile are the other way around. argh. maybe make it link to the faq? Smile

sorry for wasting time, delete please. Mad

You can post new topics in this forum


What is WinSCP?

It is award-winning SFTP client, SCP client, FTPS client and FTP client integrated into one software program for file transfer to FTP server or secure SFTP server. [More]

And it's free!


About donations

$9   $19   $49   $99

About donations


WinSCP Privacy Policy

WinSCP License