So I run the following command to open QEMU :
qemu-system-x86_64 -m 64M -hda ../debian_squeeze_amd64_standard.qcow2 -append "root=/dev/sda1 console=tty0 console=ttyS0,115200n8" -kernel arch/x86_64/boot/bzImage -nographic -net nic,vlan=1 -net user,vlan=1 -redir tcp:2222::22
And the code works and QEMU starts but when I type the following code to code the file newcheck, it shows error :
root@debian-amd64:~# scp -P 2222 newcheck root@localhost:~
ssh: connect to host localhost port 2222: Connection refused
lost connection
Can someone please let me know what is wrong?