{"issue":{"state":"closed","created_at":"2011-12-06T00:40:41Z","updated_at":"2011-12-06T20:54:29Z","user":{"gravatar_id":"ec2607d0ede75f48b872a71914ef3824","id":1243227,"url":"https://api.github.com/users/flaxton","login":"flaxton","avatar_url":"https://secure.gravatar.com/avatar/ec2607d0ede75f48b872a71914ef3824?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":8,"body":"I had been beating my head against the wall, trying to find out why scp was no longer working.  Then I read that \"echo\" in your .bash initailization scripts is known to break it.\r\n\r\nA little background. I use a Mac running OS X 10.7 Lion, and administer a Linux server running RHES 5, and have for 10 years.  I keep my ssh keys on my Mac and have the public key copied to authorized_keys on the Linux server.  ssh continues to work normally.  I seldom scp, but when I tried today, everything seemed to work, except it didn't actually transfer a file (local to remote), it just hangs.  Sending from remote to local spits out a line giving the file permissions, size and file name, but it doesn't actually transfer the file.\r\n\r\nI tried lots of things - turned off the firewall, even went so far as to install the Mac Ports version of openssh, but no go.\r\n\r\nThen I remembered that I had added .bash_ps1 to the end of my .bash_profile.  I commented it out on both ends and *voila* scp works again.\r\n\r\nI am an intermediate bash user.  I'm not sure what could be done to see if you're using scp, and disable the echo.  I suppose checking parameter $0 might work.\r\n\r\nAnyway, I have .bash_ps1 disabled for now.\r\n\r\nThanks!\r\n\r\nFred\r\n\r\n","assignee":{"gravatar_id":"14d8b7ab20d6534c61003d0eefa7c7e1","id":41564,"url":"https://api.github.com/users/emilis","login":"emilis","avatar_url":"https://secure.gravatar.com/avatar/14d8b7ab20d6534c61003d0eefa7c7e1?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2456980,"labels":[],"number":2,"title":"Breaks scp","html_url":"https://github.com/emilis/emilis-config/issues/2","closed_at":"2011-12-06T19:57:28Z","url":"https://api.github.com/repos/emilis/emilis-config/issues/2","milestone":null},"action":"created","comment":{"created_at":"2011-12-06T20:54:29Z","updated_at":"2011-12-06T20:54:29Z","user":{"gravatar_id":"ec2607d0ede75f48b872a71914ef3824","id":1243227,"url":"https://api.github.com/users/flaxton","login":"flaxton","avatar_url":"https://secure.gravatar.com/avatar/ec2607d0ede75f48b872a71914ef3824?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"The problem still happens with the change.  When I remove it from .bashrc then scp again works normally.\r\n\r\nFred\r\n\r\n-- \r\n\r\nFred Laxton\r\nInfoTechDesign.net\r\n\r\n\"Your Website, Done Right\"\r\n\r\nemail: fred@infotechdesign.net\r\nweb:   http://infotechdesign.net\r\nand    http://about.me/fredonline\r\nphone: 864.724.9112\r\n\r\n\r\n\r\nOn Dec 6, 2011, at 3:07 PM, Emilis Dambauskas wrote:\r\n\r\n> @flaxton: Can you test the new code and see if it fixes your problems?\r\n> \r\n> I changed a line of code in .bashrc\r\n> \r\n> from this:\r\n> \r\n> ```bash\r\n> if [ -f \"$HOME/.bash_ps1\" ]; then\r\n>    . \"$HOME/.bash_ps1\"\r\n> fi\r\n> ```\r\n> \r\n> to this:\r\n> \r\n> ```bash\r\n> if [ -n \"$PS1\" -a -f \"$HOME/.bash_ps1\" ]; then\r\n>    . \"$HOME/.bash_ps1\"\r\n> fi\r\n> ```\r\n> \r\n> If it works, I will send the fix to Whitson Gordon @ Lifehacker to ask to update this article:\r\n> http://lifehacker.com/5840450/add-a-handy-separator-between-commands-in-your-terminal-on-mac-os-x-and-linux/\r\n> \r\n> --- \r\n> Reply to this email directly or view it on GitHub:\r\n> https://github.com/emilis/emilis-config/issues/2#issuecomment-3037883","id":3038583,"url":"https://api.github.com/repos/emilis/emilis-config/issues/comments/3038583"}}