报错代码:
> scp test.txt 192.168.0.1:
scp: dest open "./test.txt": Failure
scp: failed to upload file test.txt to .
(补充:这里以将 test.txt 文件传到 IP 地址 192.168.0.1 同名用户的家目录然后报错为例)
分析:
可能是目标目录的空间不够了
解决方法:
在目标目录上释放一些空间
> scp test.txt 192.168.0.1:
scp: dest open "./test.txt": Failure
scp: failed to upload file test.txt to .
(补充:这里以将 test.txt 文件传到 IP 地址 192.168.0.1 同名用户的家目录然后报错为例)
可能是目标目录的空间不够了
在目标目录上释放一些空间
default_password_lifetime = 90
password_reuse_interval = 90
password_history = 3
password_require_current = ON
(
补充:
1) 这里的 default_password_lifetime = 90 表示密码的有效期是 90 天
2) 这里的 password_reuse_interval = 90 表示使用过的密码将保留 90 天,在这段时间里密码将不能再被设置成登录密码
3) 这里的 password_history = 3 表示保留最近 3 次用过的密码,这些密码将被再被设置成登陆密码
4) 这里的 password_require_current = ON 表示修改密码时需要验证现有的密码
)
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:1c:42:c9:3c:81 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.129/24 brd 10.10.10.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fdb2:2c26:f4e4:0:55da:1265:541f:8007/64 scope global temporary dynamic
valid_lft 563315sec preferred_lft 44695sec
inet6 fdb2:2c26:f4e4:0:21c:42ff:fec9:3c81/64 scope global dynamic mngtmpaddr
valid_lft 2591846sec preferred_lft 604646sec
inet6 fe80::21c:42ff:fec9:3c81/64 scope link
valid_lft forever preferred_lft forever
或者:
# ip a s
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:1c:42:c9:3c:81 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.129/24 brd 10.10.10.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fdb2:2c26:f4e4:0:55da:1265:541f:8007/64 scope global temporary dynamic
valid_lft 563315sec preferred_lft 44695sec
inet6 fdb2:2c26:f4e4:0:21c:42ff:fec9:3c81/64 scope global dynamic mngtmpaddr
valid_lft 2591846sec preferred_lft 604646sec
inet6 fe80::21c:42ff:fec9:3c81/64 scope link
valid_lft forever preferred_lft forever
或者:
# ip address show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:1c:42:c9:3c:81 brd ff:ff:ff:ff:ff:ff
inet 10.10.10.129/24 brd 10.10.10.255 scope global eth0
valid_lft forever preferred_lft forever
inet6 fdb2:2c26:f4e4:0:55da:1265:541f:8007/64 scope global temporary dynamic
valid_lft 563315sec preferred_lft 44695sec
inet6 fdb2:2c26:f4e4:0:21c:42ff:fec9:3c81/64 scope global dynamic mngtmpaddr
valid_lft 2591846sec preferred_lft 604646sec
inet6 fe80::21c:42ff:fec9:3c81/64 scope link
valid_lft forever preferred_lft forever
# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 10.10.10.129 netmask 255.255.255.0 broadcast 10.10.10.255
inet6 fdb2:2c26:f4e4:0:21c:42ff:fec9:3c81 prefixlen 64 scopeid 0x0<global>
inet6 fe80::21c:42ff:fec9:3c81 prefixlen 64 scopeid 0x20<link>
inet6 fdb2:2c26:f4e4:0:55da:1265:541f:8007 prefixlen 64 scopeid 0x0<global>
ether 00:1c:42:c9:3c:81 txqueuelen 1000 (Ethernet)
RX packets 698666 bytes 485434755 (462.9 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 372557 bytes 699406543 (667.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 73792 bytes 394285172 (376.0 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 73792 bytes 394285172 (376.0 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
# iwconfig
lo no wireless extensions.
eth0 no wireless extensions.
# ip a add 192.168.0.11/24 dev eth0
或者:
# ip a add 192.168.0.11/255.255.255.0 dev eth0
(补充:这里以给 eth0 网卡配置 IP 地址 192.168.0.11/24 为例)
# ip link set dev eth0 up
(补充:这里以让 eth0 网卡上的配置生效为例)
# ip route add default via 192.168.0.1
(补充:这里以添加 IP 地址为 192.168.0.1 的网关为例)
# ip route add 10.0.0.0/24 via 192.168.0.254
(补充:这里以添加指向网段 10.0.0.0/24 的流量通过 IP 地址 192.168.0.254 的路由为例)
# ip a del 192.168.0.11 dev eth0
(补充:这里以删除 eth0 网卡上的 IP 地址 192.168.0.11 为例)
# ip route del default via 192.168.0.1
(补充:这以删除已配置的网关 IP 地址 192.168.0.1 为例)
# ip route del 10.0.0.0/24 dev eth0
或者:
# ip route del 192.168.0.254
(补充:这里以删除在 eth0 网卡上指向网段 10.0.0.0/24 的路由或者通过 IP 地址 192.168.0.254 的路由为例)
# /usr/sbin/ethtool eth0
确保输出结果如下:
......
Link detected: no
否则需要在网卡配置文件中添加以下内容:
......
LINK_REQUIRED='no'
# vi /etc/sysconfig/network/ifcfg-eth0
添加以下内容:
BOOTPROTO='static'
IPADDR='192.168.0.10/24'
STARTMODE='auto'
(
补充:这里以设置
1) 使用静态 IP 地址
2) IP 地址是 192.168.1.5
3) 子网掩码是 24
4) 开机自启
为例
)
# vim /etc/sysconfig/network/routes
将全部内容修改如下:
default 192.168.0.1
(补充:这里以设置 192.168.0.1 为网关 IP 地址为例)
# service network restart
https://www.suse.com/support/kb/doc/?id=000019764
https://www.suse.com/support/kb/doc/?id=000019454
# tcpdump -s 0 -i INTERFACE -w /tmp/tcpdump.pcap
(补充:这里以生成名为 /tmp/tcpdump.pcap 的 TCP 报告为例)
# strace -fvttTyy -s 4096 -o /tmp/strace.log
(补充:这里以生成名为 /tmp/strace.log 的追踪报告为例)
# mount -vvv -t cifs -o username=<share user>,password=<share password>,domain=<share domain> //<share folder> /mnt
(补充:这里以挂载 Samba 目录为例)
(注意:在本文章中,在前面生成的 TCP 报告是 /tmp/tcpdump.pcap 追踪报告是 /tmp/strace.log)