Re: SCP fails while ssh works...

2004-02-10 Thread Quintin Riis
Are you using bash ?

If ~/.bashrc generates ANY output, it WILL break the scp and rcp commands.

		Quintin

twig les wrote:

Hey all, I have to identical boxes running 4.6 and all of a
sudden one stopped taking SCP even though it still takes ssh
connections.  The other box is still working fine and they are
on the same subnet.  The only thing I could find online about
this is an MTU mismatch which makes no sense in this situation. 
I can bounce the sshd proc when I get someone on site since
these are in a different state.  The -v outputs are below,
snipped for clari/brevity.  Notice the bad guy's (booo, hiss
hiss) inability to form a complete connection.

GOOD CONNECTION:
debug: SshConfig/sshconfig.c:2232/ssh2_parse_config: Unable to
open /opt/home/ktokash/.ssh2/identification
debug: Ssh2AuthClient/sshauthc.c:316/ssh_authc_completion_proc:
Method 'publickey' disabled.
debug: server offers auth methods
'publickey,password,keyboard-interactive'.
debug:
Ssh2AuthPasswdClient/authc-passwd.c:95/ssh_client_auth_passwd:
Starting password query...
[EMAIL PROTECTED]'s password: 
debug: Ssh2Common/sshcommon.c:286/ssh_common_special: Received
SSH_CROSS_AUTHENTICATED packet from connection protocol.
debug: Ssh2/ssh2.c:646/client_authentication_notify: Returning
user input stream to original values.
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
debug: Ssh2Common/sshcommon.c:829/ssh_common_new_channel:
num_channels now 1
debug:
SshTtyFlags/sshttyflags.c:354/ssh_internal_encode_tty_flags: Not
a tty. (fd = 0)
scp:SshFCTransfer/sshfc_transfer.c:1866/transfer_rm_dest:
Removing destination file ./snortrules-stable.tar.gz .
scp:SshFCTransferCore/sshfc_trcore.c:125/transfer_start:
Starting transfer for file snortrules-stable.tar.gz, destination
./snortrules-stable.tar.gz
snortrules-stable.tar.gz
 |  211kB |
211.2 kB/s | TOC: 00:00:01 | 100%
scp:SshFCTransfer/sshfc_transfer.c:2489/transfer_one_done:
Finished with file ./snortrules-stable.tar.gz.
scp:Scp2/scp2.c:706/transfer_ready_cb: Received error SSH_FC_OK,
error message .
scp:Scp2/scp2.c:867/scp_transfer: Transfer ready
scp:ssh_pipe_stream_destroy
scp:SshAppCommon/sshappcommon.c:146/ssh_app_free_global_regex_context:
Freeing global SshRegex context.
debug:
SshConnection/sshconn.c:405/ssh_conn_send_channel_data_type: EOF
from channel stream
cge01% debug:
SshConnection/sshconn.c:667/ssh_conn_channel_write: EOF received
on write from channel 0x207570, extended stream 0.
debug:
Ssh2ChannelSession/sshchsession.c:1716/ssh_channel_session_request_exit_status:
received exit status : 0
debug: Ssh2Common/sshcommon.c:803/ssh_common_destroy_channel:
num_channels now 0
debug: Got session close with exit_status=0
debug: destroying client struct...
debug: Ssh2Client/sshclient.c:1478/ssh_client_destroy:
Destroying client.
debug: SshConfig/sshconfig.c:537/ssh_config_pki_free: Freeing
pki. (host_pki != NULL, user_pki = NULL)
debug: SshConnection/sshconn.c:1982/ssh_conn_destroy: Destroying
SshConn object.
debug: Ssh2Client/sshclient.c:1540/ssh_client_destroy_finalize:
Destroying client completed.
debug:
SshAuthMethodClient/sshauthmethodc.c:89/ssh_client_authentication_uninitialize:
Destroying authentication method array.
debug: Ssh2/ssh2.c:363/sigpipe_nonfatal_cb: Received SIGPIPE.
debug:
SshAppCommon/sshappcommon.c:146/ssh_app_free_global_regex_context:
Freeing global SshRegex context.
debug: SshConfig/sshconfig.c:537/ssh_config_pki_free: Freeing
pki. (host_pki = NULL, user_pki = NULL)



BAD GUY (booo, hiss hiss):
debug: SshConfig/sshconfig.c:2232/ssh2_parse_config: Unable to
open /opt/home/ktokash/.ssh2/identification
debug: Ssh2AuthClient/sshauthc.c:316/ssh_authc_completion_proc:
Method 'publickey' disabled.
debug: server offers auth methods
'publickey,password,keyboard-interactive'.
debug:
Ssh2AuthPasswdClient/authc-passwd.c:95/ssh_client_auth_passwd:
Starting password query...
[EMAIL PROTECTED]'s password: 
debug: Ssh2Common/sshcommon.c:286/ssh_common_special: Received
SSH_CROSS_AUTHENTICATED packet from connection protocol.
debug: Ssh2/ssh2.c:646/client_authentication_notify: Returning
user input stream to original values.
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
debug: Ssh2Common/sshcommon.c:829/ssh_common_new_channel:
num_channels now 1
debug:
SshTtyFlags/sshttyflags.c:354/ssh_internal_encode_tty_flags: Not
a tty. (fd = 0)
debug:
Ssh2ChannelSession/sshchsession.c:2232/ssh_channel_start_session_completion2:
starting session failed: result 0
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...

Re: SCP fails while ssh works...

2004-02-10 Thread Lowell Gilbert
Quintin Riis [EMAIL PROTECTED] writes:

 Are you using bash ?
 
 If ~/.bashrc generates ANY output, it WILL break the scp and rcp commands.

And there's nothing about this specific to bash, either; on any shell,
producing output 
 from the startup scripts 
 in a non-interactive shell 
WILL break the scp and rcp commands.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


SCP fails while ssh works...

2004-02-09 Thread twig les
Hey all, I have to identical boxes running 4.6 and all of a
sudden one stopped taking SCP even though it still takes ssh
connections.  The other box is still working fine and they are
on the same subnet.  The only thing I could find online about
this is an MTU mismatch which makes no sense in this situation. 
I can bounce the sshd proc when I get someone on site since
these are in a different state.  The -v outputs are below,
snipped for clari/brevity.  Notice the bad guy's (booo, hiss
hiss) inability to form a complete connection.

GOOD CONNECTION:
debug: SshConfig/sshconfig.c:2232/ssh2_parse_config: Unable to
open /opt/home/ktokash/.ssh2/identification
debug: Ssh2AuthClient/sshauthc.c:316/ssh_authc_completion_proc:
Method 'publickey' disabled.
debug: server offers auth methods
'publickey,password,keyboard-interactive'.
debug:
Ssh2AuthPasswdClient/authc-passwd.c:95/ssh_client_auth_passwd:
Starting password query...
[EMAIL PROTECTED]'s password: 
debug: Ssh2Common/sshcommon.c:286/ssh_common_special: Received
SSH_CROSS_AUTHENTICATED packet from connection protocol.
debug: Ssh2/ssh2.c:646/client_authentication_notify: Returning
user input stream to original values.
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
debug: Ssh2Common/sshcommon.c:829/ssh_common_new_channel:
num_channels now 1
debug:
SshTtyFlags/sshttyflags.c:354/ssh_internal_encode_tty_flags: Not
a tty. (fd = 0)
scp:SshFCTransfer/sshfc_transfer.c:1866/transfer_rm_dest:
Removing destination file ./snortrules-stable.tar.gz .
scp:SshFCTransferCore/sshfc_trcore.c:125/transfer_start:
Starting transfer for file snortrules-stable.tar.gz, destination
./snortrules-stable.tar.gz
snortrules-stable.tar.gz
 |  211kB |
211.2 kB/s | TOC: 00:00:01 | 100%
scp:SshFCTransfer/sshfc_transfer.c:2489/transfer_one_done:
Finished with file ./snortrules-stable.tar.gz.
scp:Scp2/scp2.c:706/transfer_ready_cb: Received error SSH_FC_OK,
error message .
scp:Scp2/scp2.c:867/scp_transfer: Transfer ready
scp:ssh_pipe_stream_destroy
scp:SshAppCommon/sshappcommon.c:146/ssh_app_free_global_regex_context:
Freeing global SshRegex context.
debug:
SshConnection/sshconn.c:405/ssh_conn_send_channel_data_type: EOF
from channel stream
cge01% debug:
SshConnection/sshconn.c:667/ssh_conn_channel_write: EOF received
on write from channel 0x207570, extended stream 0.
debug:
Ssh2ChannelSession/sshchsession.c:1716/ssh_channel_session_request_exit_status:
received exit status : 0
debug: Ssh2Common/sshcommon.c:803/ssh_common_destroy_channel:
num_channels now 0
debug: Got session close with exit_status=0
debug: destroying client struct...
debug: Ssh2Client/sshclient.c:1478/ssh_client_destroy:
Destroying client.
debug: SshConfig/sshconfig.c:537/ssh_config_pki_free: Freeing
pki. (host_pki != NULL, user_pki = NULL)
debug: SshConnection/sshconn.c:1982/ssh_conn_destroy: Destroying
SshConn object.
debug: Ssh2Client/sshclient.c:1540/ssh_client_destroy_finalize:
Destroying client completed.
debug:
SshAuthMethodClient/sshauthmethodc.c:89/ssh_client_authentication_uninitialize:
Destroying authentication method array.
debug: Ssh2/ssh2.c:363/sigpipe_nonfatal_cb: Received SIGPIPE.
debug:
SshAppCommon/sshappcommon.c:146/ssh_app_free_global_regex_context:
Freeing global SshRegex context.
debug: SshConfig/sshconfig.c:537/ssh_config_pki_free: Freeing
pki. (host_pki = NULL, user_pki = NULL)



BAD GUY (booo, hiss hiss):
debug: SshConfig/sshconfig.c:2232/ssh2_parse_config: Unable to
open /opt/home/ktokash/.ssh2/identification
debug: Ssh2AuthClient/sshauthc.c:316/ssh_authc_completion_proc:
Method 'publickey' disabled.
debug: server offers auth methods
'publickey,password,keyboard-interactive'.
debug:
Ssh2AuthPasswdClient/authc-passwd.c:95/ssh_client_auth_passwd:
Starting password query...
[EMAIL PROTECTED]'s password: 
debug: Ssh2Common/sshcommon.c:286/ssh_common_special: Received
SSH_CROSS_AUTHENTICATED packet from connection protocol.
debug: Ssh2/ssh2.c:646/client_authentication_notify: Returning
user input stream to original values.
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
debug: Ssh2Common/sshcommon.c:829/ssh_common_new_channel:
num_channels now 1
debug:
SshTtyFlags/sshttyflags.c:354/ssh_internal_encode_tty_flags: Not
a tty. (fd = 0)
debug:
Ssh2ChannelSession/sshchsession.c:2232/ssh_channel_start_session_completion2:
starting session failed: result 0
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. Waiting...
scp:SshFCTransfer/sshfc_transfer.c:1592/transfer_stat_before_rm_cb:
No connection yet. 

Re: SCP fails while ssh works...

2004-02-09 Thread Garance A Drosihn
At 1:08 PM -0800 2/9/04, twig les wrote:
Hey all, I have to identical boxes running 4.6 and all of a
sudden one stopped taking SCP even though it still takes ssh
connections.
This may not help you at all, but every time I've had a problem
where scp fails and ssh works, it has been because the userid on
the remote side printed out some extra text while it was logging
in.  Something like 'Welcome to ' in the .bashrc, for instance.
--
Garance Alistair Drosehn=   [EMAIL PROTECTED]
Senior Systems Programmer   or  [EMAIL PROTECTED]
Rensselaer Polytechnic Instituteor  [EMAIL PROTECTED]
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: SCP fails while ssh works...

2004-02-09 Thread Lowell Gilbert
Garance A Drosihn [EMAIL PROTECTED] writes:

 At 1:08 PM -0800 2/9/04, twig les wrote:
 Hey all, I have to identical boxes running 4.6 and all of a
 sudden one stopped taking SCP even though it still takes ssh
 connections.
 
 This may not help you at all, but every time I've had a problem
 where scp fails and ssh works, it has been because the userid on
 the remote side printed out some extra text while it was logging
 in.  Something like 'Welcome to ' in the .bashrc, for instance.

The solution to that type of problem is to have the text be printed
only on interactive sessions.  

e.g.:
if tty -s; then 
echo 'executing .bashrc'
fi

I thought once defined shell functions to do that for me, but they
aren't in my startup files now...
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]