Output in separate files

Hi all,

i have the bash script for remote conection,

for hosts in $(cat /list);  do
       ssh user1@$hosts "hostname";
done

execute hostname command by all hosts and show standar ouput,

how i can send to file by each host in lists, so

e.g.

$cat list
10.0.0.1
10.0.0.2
10.0.0.3

afeter execute script create separate files file1, file3 file3

$cat file1
machine1

$cat file2
machine2

$cat file3
machine3

Thansk you,

Redirect ssh 's output to "file${hosts##*.}" .