ssh works, scp fails

I recently ran across this and found this very helpful post: http://lists.freebsd.org/pipermail/freebsd-questions/2004-February/035618.html

> 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.

Turns out if /etc/bashrc outputs anything either this will cause scp to fail as well!  We have a password expiry that is showed if a users password is going to expire within 30 days.  Commented out the warning in /etc/bashrc and scp worked like a charm!

Advertisements

Multiple instances of mysql same version

# mkdir /etc/mysql

# /etc/mysql/dev.cnf (Instance name)

[mysqld]
bind-address = IP Address
datadir=/data/mysql-dev
socket=/data/mysql-dev/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
general-log-file=/var/log/mysqld_dev.log
general-log=on

[mysqld_safe]
log-error=/data/mysql-dev/error.log
socket=/data/mysql-dev/mysql.sock

# Make a datadir and /etc/mysql/dev .cnf file for all instances you would like such as stg and prod etc.

# Edit default mysql init script with the following differences

45a46,47
> conffile=dev.cnf
> confdir=/etc/mysql
47c49,50
< datadir=

> datadir=/data/mysql-dev/
> mysqld_pid_file_path=/data/mysql-dev/mysqld.pid
63d65
< mysqld_pid_file_path=
283c285
< $bindir/mysqld_safe –datadir=”$datadir” –pid-file=”$mysqld_pid_file_path” $other_args >/dev/null 2>&1 &

> $bindir/mysqld_safe –defaults-file=$confdir/$conffile –datadir=”$datadir” –pid-file=”$mysqld_pid_file_path” $other_args >/dev/null 2>&1 &
384a387
>

# touch /var/log/mysqld_dev; chown mysql:mysql /var/log/mysqld_dev

# mkdir /data/mysql-dev; chown -R mysql:mysql /data/mysql-dev

# Run: /usr/bin/mysql_install_db –datadir=/data/mysql-dev

# chown -R mysql:mysql /data/mysql-dev/

# Create the necessary binaries

# vi /usr/bin/mysql-dev

# Insert: /usr/bin/mysql -S /data/mysql-dev/mysql.sock $@

# vi /usr/bin/mysqldump-dev

# Insert: /usr/bin/mysqldump -S /data/mysql-dev/mysql.sock $@